[FUSE] [SDKs] Define __slots__ to improve memory utilization
Both arv-get and FUSE use a lot of memory. Idea: define
__slots__ for classes where it will noticeably improve memory utilization.
First class candidates: objects that are both instantiated commonly and long-lived. The Collection classes, File classes, Range, and LocatorAndRange in the SDK. The Directory and File classes in FUSE.
Second class candidates: objects that are instantiated commonly but with shorter lives. KeepService, ThreadLimiter, RetryLoop.
#2 Updated by Peter Amstutz over 5 years ago
Adds slots to Range, LocatorAndRange, and CacheSlot. These are the obvious low hanging fruit, and together they reduce memory usage by half on a very complex manifest (215dd32873bfa002aa0387c6794e4b2c+54081534)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND peter 21943 10.4 9.3 1312088 1139036 pts/3 Sl+ 16:58 0:36 python get.py
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND peter 26853 16.5 4.9 781648 608492 pts/3 Sl+ 17:04 0:37 python get.py