diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-23 16:12:24 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 08:07:40 -0500 |
| commit | 198b5c5bcdd5c17934da836dceacb97dcb3c3cbd (patch) | |
| tree | bbc25eb6d256c805e50e421afc87d8d34cb15263 /runtime/src/bcpack.cpp | |
| parent | 9600cf0c648a8b2c4ce18521e416815d3d43eeb2 (diff) | |
world_build: drop a staged chunk PNG once no later chunk uses it (BUILD-WORLD-BAKED-PNG-BUDGET)
The staged build (spatial, grid and baked placements) decoded every chunk texture into a per-build
cache that kept each PNG until the build returned, so the decoded PNGs held grew with the chunk
count. Count each chunk's use of a texture before the chunks are written and drop the cache entry
when its last chunk takes it. A texture is still decoded once per build, waiters still share one
decode, and the chunks and world.json are byte-identical.
In a synthetic 24-chunk build, decoded PNGs alive while the last chunk is written fall from 26 to 3
(spatial, 1 worker) and the grid layout's peak from 26 to 11.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/bcpack.cpp')
0 files changed, 0 insertions, 0 deletions