Repository navigation
[pull] main from ArchipelagoMW:main - #568
Merged
Merged
Conversation
…sage (#5981) * MultiServer, customserver: move data package handling Create a new class that handles conversion worlds+embedded -> context data. Create a derived class that uses static_server_data+pony instead. There is also a not very efficient feature to deduplicate strings (may need perf testing). By moving code around, we can simplify a lot of the world loading. Where code lines were touched, some typing and some reformatting was added. The back compat for GetDataPackage without games was finally dropped. This was done as a cleanup because the refactoring touched those lines anyway. Also reworked the per-context dicts and the RoomInfo to hopefully be more efficient by ignoring unused games. (Generating the list of used games was required for the new code anyway.) Side effect of the MultiServer cache: we now load worlds lazily (but still all at once) and don't modify the games package in place. If needed we create copies. This almost gets us to the point where MultiServer doesn't need worlds - it still needs them for the forbidden items. There is a bonus optimization that deduplicates strings in name_groups that may have bad performance and may need some perf testing if we run into issues. * MultiServer: fix string deduplication in data package cache * MultiServer, customserver: minor formatting fixes * MultiServer: fix data package cache for missing checksum case * MultiServer: improve string deduplication in games package cache * customserver: handle missing checksum in datapackage cache * customserver: typing cleanup in games package cache * Test, MultiServer, customser: add tests for games package cache * Test, MultiServer: reorder imports Hopefully this fixes the random test failures with pytest-xdist * customserver: make WebHost import lazy in games package cache and fix test * customserver: games package cache: fix py3.11 compat * MultiServer, customserver: cache: typing improvements * customserver: cache: reformat * Test: move customserver tests to not interfere with webhost * MultiServer, customserver: cache: rename module * Multiserver: better error message for missing Datapackage * customserver: cache: invert if for readability * customserver: optimize non_hintable_names * Use an empty frozenset singleton * Only include non-empty sets in static_server_data * Only prefill dict with played games This should save ~2-4KB per room and slightly speedup lookup. --------- Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )