Structure starts: keep four times as many chunks cached

Players spread far apart read more start chunks than the cache held, so
outposts' and trial chambers' jigsaws were built again on the server thread
whenever natural spawning asked about them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
bulkandClaude Opus 5.5 committed 2026-11-07 15:54:23 +00:00
1 parent d20e7bf74e
commit da2c8d2d48
1 file changed
+7 -1
@@ -130,7 +130,13 @@ impl RingWork {
rings
}
}
const START_CACHE_LIMIT: usize = 65536;
/// Chunks kept per generation of the cache. Each player's generated area
/// reads the starts of some 2,000 chunks (its view distance plus the
/// references' reach, at view distance 10): at 65,536, a server with 200
/// players spread over the map overflowed it every few ticks and rebuilt
/// outposts' and trial chambers' jigsaws on the server thread, where natural
/// spawning asks about them. Most entries are chunks with no start.
const START_CACHE_LIMIT: usize = 262_144;
const START_SHARDS: usize = 64;
/// The built starts by chunk, in shards: a lookup locks one shard for