perf: double populate budget in release builds

512 chunks/frame in debug, 1024 in release. In release, recolor runs
~2x faster so 1024 still costs ~1ms but clears the dirty queue twice
as fast, closing the p99 gap during rapid z-scrolling.
This commit is contained in:
2026-03-20 15:44:47 +00:00
parent 2b8e1c32b9
commit 21e9dc1f34
+3
View File
@@ -57,7 +57,10 @@ impl Default for TilemapChunkSpawner {
} }
} }
#[cfg(debug_assertions)]
pub const MAX_POPULATE_PER_FRAME: usize = 512; pub const MAX_POPULATE_PER_FRAME: usize = 512;
#[cfg(not(debug_assertions))]
pub const MAX_POPULATE_PER_FRAME: usize = 1024;
#[derive(Resource)] #[derive(Resource)]
pub struct PreviousZIndex(pub i32); pub struct PreviousZIndex(pub i32);