xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 4 years ago

Closed 4 years ago

Last modified 16 months ago

#1836 closed task (fixed)

reduce memory footprint

Reported by: Antoine Martin Owned by: J. Max Mena
Priority: major Milestone: 2.4
Component: core Version: 2.3.x
Keywords: Cc:


  • don't load modules until we actually need them
  • if we probe then discard them (ie: codec probing), make sure we unload the library

Change History (4)

comment:1 Changed 4 years ago by Antoine Martin

Status: newassigned


  • 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..
Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena
Status: assignednew

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.

comment:3 Changed 4 years ago by J. Max Mena

Resolution: fixed
Status: newclosed

Noted and closing.

comment:4 Changed 16 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1836

Note: See TracTickets for help on using tickets.