Make MultiServer use less memory #856
Labels
affects: core
Issues/PRs that touch core and may need additional validation.
meta: help wanted
Additional review/assistance is requested for these issues or pull requests.
TLDR
Currently we are looking at roughly 20MB per instance. With each world added this will rise. With rising popularity per world this may become exponential.
Analysis
MultiServer.py loads all the worlds and keeps references. This happens in
and can't be undone easily because each world will keep a reference to AutoWorld, which keeps a reference to all worlds.
Saving potential
MultiServer.py only needs a world reference for very few things currently, so it could instead work on the same DataPackage clients use with some extras, not loading any world.
Or it could load only the played worlds, which would still save the majority of the memory.
Currently the client protocol requires each MultiServer to hold data for all worlds, but that will be changed in #813 via #757
Proposed solution A
edit:
Points 1 and 2 are done for WebHost, point 3 should be complete in #877
Point 4 is new
The text was updated successfully, but these errors were encountered: