Xpra: Ticket #1836: reduce memory footprint
- don't load modules until we actually need them
- if we probe then discard them (ie: codec probing), make sure we unload the library
Fri, 11 May 2018 06:42:05 GMT - Antoine Martin: status changed
- status
changed from new to assigned
Done:
- r19271 auth modules (+r19272)
- r19273 zlib in websockets (still loaded for network caps...)
- r19275 delay loading
XpraProxy
until actually needed
- r19276 split crypto from digest bits (still loaded from network caps..)
- #1850 unused video encoder contexts were lingering
- #1838 base class refactoring / skip loading unused functionality
- r19285 launcher was doing
crypto_backend_init
unconditionally
Still TODO - probably using imp.find_module to do a lazy module presence check:
- delay or remove extra bits (ie: version info) from the network caps so we don't need to load crypto or zlib, lzo, lz4, yaml, bencode, etc
- build a map of codecs-to-encoding(s), so we know what we can handle without actually loading them? won't work for video codecs as those have too many build time + runtime options (ie: checks for hardware availability) - and those are the heavy ones unfortunately..
Tue, 22 May 2018 09:06:53 GMT - Antoine Martin: owner, status changed
- owner
changed from Antoine Martin to J. Max Mena
- status
changed from assigned to new
According to https://stackoverflow.com/a/29579072/428751: CPython never unloads its C extension modules.
As for the packet encoders and packet compressors, it would be really tedious to use lazy loading here and those libraries are very small anyway.
So this will do for now.
@maxmylyn: mostly a FYI, you probably won't be able to spot the small decrease in memory usage unless you also take advantage of #1838 to completely turn off some subsystems.
Tue, 12 Jun 2018 16:56:45 GMT - J. Max Mena: status changed; resolution set
- status
changed from new to closed
- resolution
set to fixed
Noted and closing.
Sat, 23 Jan 2021 05:35:04 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1836