18 | | * If Python is eating too much memory, it could be because you are instantiating lots of a particular class, consider using {{{__slots__}}} http://stackoverflow.com/questions/472000/python-slots |
19 | | * You can check the actual memory usage per class using {{{MyClass.__basicsize__}}}, remembering that subclasses of classes without {{{__slots__}}} or top-level classes without {{{__slots__}}} have a {{{__dict__}}} which also takes up memory. |
| 18 | * If Python is eating too much memory, it could be because you are instantiating lots of a particular class, consider using !__slots!__ http://stackoverflow.com/questions/472000/python-slots |
| 19 | * You can check the actual memory usage per class using !MyClass.!__basicsize!__, remembering that subclasses of classes without !__slots!__ or top-level classes without !__slots!__ have a !__dict!__ which also takes up memory. |