[GH-ISSUE #7400] Startup: versioned snapshot cache for worldgen generator data #3226

Open
opened 2026-11-03 04:06:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @socksprox on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7400

Originally assigned to: @socksprox on GitHub.

Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally.

GeneratorData::load (worldgen/generator.rs) parses the whole worldgen/ dir via serde_json::from_str per bundle file — the biggest startup cost of world loading — and keeps the JSON strings alive as Bundle maps and decoration-cache keys. level/data/cache.rs already implements the pattern needed (behaviours-v2.bin, SHA-256 fingerprint of sources + executable, .horizon-cache dir, safe fallback). Apply the same snapshot pattern: fingerprint covering every file the loader reads.

Verify: worldgen parity harnesses, same seed → byte-identical chunks vs the JSON path.

Originally created by @socksprox on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7400 Originally assigned to: @socksprox on GitHub. Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally. `GeneratorData::load` (`worldgen/generator.rs`) parses the whole `worldgen/` dir via `serde_json::from_str` per bundle file — the biggest startup cost of world loading — and keeps the JSON strings alive as `Bundle` maps and decoration-cache keys. `level/data/cache.rs` already implements the pattern needed (`behaviours-v2.bin`, SHA-256 fingerprint of sources + executable, `.horizon-cache` dir, safe fallback). Apply the same snapshot pattern: fingerprint covering every file the loader reads. Verify: worldgen parity harnesses, same seed → byte-identical chunks vs the JSON path.
Author
Owner

@socksprox commented on GitHub (Nov 2, 2026):

/claim

<!-- gh-comment-id:6580849806 --> @socksprox commented on GitHub (Nov 2, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3226
No description provided.