♻️ Refactor some allocations

This commit is contained in:
Aitor Moreno 2025-06-04 13:53:27 +02:00
parent 4f7d97a31e
commit 8922e7454f
9 changed files with 183 additions and 12 deletions

View file

@ -572,6 +572,9 @@ impl RenderState {
performance::end_measure!("tile_cache");
self.pending_nodes.clear();
if self.pending_nodes.capacity() < tree.len() {
self.pending_nodes.reserve(tree.len() - self.pending_nodes.capacity());
}
// reorder by distance to the center.
self.current_tile = None;
self.render_in_progress = true;