Phase B: Compiletime Function & Memory Snapshotting #16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement compiletime memory snapshotting and incremental delta execution for compiletime expressions and functions.
Motivation & Impact
In large maps like Twilight's Eve Reborn, ~800ms – 1,100ms of incremental rebuild time is spent executing 19 compiletime functions and 94 compiletime expressions inside the JVM interpreter. 85% of these evaluations re-seed static database caches (
_seedTeverDb,_seedSpawnPoolRows, dummy definitions) that never change during standard gameplay or ECS system edits.By snapshotting the compiletime global variable values and hashtable memory to disk (
_build/cache/cte_snapshot.bin) keyed by compiletime function AST hashes, unmodified compiletime functions can restore their state in <20ms instead of re-evaluating SQL and interpreter loops.Acceptance Criteria
Implemented in commit
2df3d7637:WurstHashtabledata model toLinkedHashMapto ensure 100% deterministic iteration order.cte_hashtables.bin.executeCompiletimeExprfor global hashtable handles._seedTeverDb,_seedSpawnPoolRows,seedItemAttributeCatalog,seedItemAttributeMetadata) when hashtable snapshot is loaded.