From b9c252474853d47c91bd6c03cd6bf8752378061f Mon Sep 17 00:00:00 2001 From: Panos <25664832+mechpanos@users.noreply.github.com> Date: Fri, 4 Sep 2026 17:55:19 +0300 Subject: [PATCH] perf: warm the entity quadtree alongside the handle index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warming only the interaction handle index left the first hover at 385 ms, down from 992 but not gone: hover-detail query=0.1 handles=384.6 ... candidates=186 The handles stage builds two indexes, not one. `interaction_candidate_handles` also reaches for `entity_index()` — the entity quadtree, keyed on geometry_epoch and just as cold at that point. Warm both. Co-Authored-By: Claude Opus 5 --- src/scene/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 67a3ed77c..fff1285b1 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -7912,6 +7912,11 @@ impl Scene { /// already waiting. A second on an open that is already seconds long reads /// very differently from a second-long freeze on a mouse move. pub(crate) fn warm_interaction_caches(&self) { + // Both indexes on the hover path, not just one. The handle index alone + // left `hover-detail ... handles=384.6` on the first hover: the same + // stage also builds the entity quadtree, which is keyed on + // `geometry_epoch` and equally cold at that point. + let _ = self.entity_index(); let _ = self.interaction_handle_index(); }