Repository navigation
Conversation
Owner
|
Hi, @Solessfir ! This PR is a mess. There is no point of doing any from of data roundtrip thru |
Contributor
Author
|
Will do it this way, thx! |
Solessfir
force-pushed
the
level-cache
branch
from
October 10, 2026 23:03
4fdfcff to
e8b7d9e
Compare
Contributor
Author
|
Reworked as suggested: no roundtrip through Reload median, same save, 3 processes x 5 reloads per mode in alternating order:
|
Solessfir
force-pushed
the
level-cache
branch
from
October 10, 2026 23:28
e8b7d9e to
4c182cf
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cache the current level's parsed ZEN descriptors, prepared visual mesh and terrain collision data across reloads. Each load still creates a fresh world, renderer, collision bodies, NPCs and script VM, then restores the save's mutable state.
Only one level is retained. Changing levels or mounting archives invalidates it; the key also includes the game version and software ray-tracing mode.
ENGINE.worldCacheMiBdefaults to 512 and accepts 0 to disable retention. This is an estimated retention budget, not a hard RAM limit. The original source mesh is still released after preparing its visual and collision representations.Measurements
Release builds compared with unchanged upstream
d2a94b4a, using the same Gothic II save and settings. Timings cover the complete load request through session finalization and renderer setup, not only static mesh preparation.On Android, three fresh processes per version each performed one initial load and five reloads, in baseline/cache/cache/baseline/cache/baseline order. Reload ranges were 1,154-1,949 ms before and 710-1,136 ms after. Battery temperature rose from about 34 to 38 C during testing, so these are measured results, not a device-independent guarantee. Median initial loads were 3.85 s before and 3.56 s after, measured separately and excluded from the reload totals. Windows used an i9-14900HX with Vulkan, ray tracing and mesh shading disabled; initial loads were 2.37 s before and 2.30 s after. An earlier desktop run during concurrent compilation was excluded.
The tested Android level retained approximately 138 MiB of estimated cache data. This trades RAM for faster reloads; GPU resources and live-world reconstruction remain uncached.
Checks
NewWorld -> OldWorld -> NewWorldtransition preserved modified NPC strength/inventory, chest contents and a trigger's disabled state. Six subsequent loads, including five cached reloads, restored the same mutations. The final save and nested visited-world archive passed CRC checks.