Intern BinaryPacker.Element and EntityData values, and PlaybackData animation ids. - #1149
Intern BinaryPacker.Element and EntityData values, and PlaybackData animation ids.#1149JaThePlayer wants to merge 4 commits into
Conversation
…ed level loading in the future.
DashingCat
left a comment
There was a problem hiding this comment.
As discussed on Discord, this PR initially broke the "Fast Level Loading" (FLL) PR #1072, but this was taken into account in the latest commits.
Besides the RAM save, this PR has an impact on loading performance:
Without changes, FLL disabled (current state):
- LEVELS LOAD: 8829ms
- LEVELS LOAD: 8696ms
- LEVELS LOAD: 8646ms
With changes, FLL disabled:
- LEVELS LOAD: 8799ms
- LEVELS LOAD: 8956ms
- LEVELS LOAD: 9002ms
Without changes, FLL enabled:
- LEVELS LOAD: 7072ms
- LEVELS LOAD: 7172ms
- LEVELS LOAD: 7186ms
With changes, FLL enabled:
- LEVELS LOAD: 8452ms
- LEVELS LOAD: 8247ms
- LEVELS LOAD: 8169ms
While this PR introduces a slowdown while loading levels, assuming we can merge both this PR and #1037, we should still have better both loading times and RAM usage, so I approve this PR.
|
The pull request was approved and entered the 3-day last-call window. |
|
here is my test result (only strawberry jam): i'm trying two ways to optimize it a little, by replace the ConcurrentDictionary with _, but failed: |
|
wait, i think i should nitpick it. |
|
The last-call window for this pull request ended. It can now be merged if no blockers were brought up. |
Saves ~50MB RAM and reduces allocated object count by ~2 millions with Strawberry Jam.
More results starting from here: https://discord.com/channels/403698615446536203/429775439423209472/1533091706080067657