From 67ea5fa2dc6695ee01355cbbe46e6386e946144a Mon Sep 17 00:00:00 2001 From: Panos <25664832+mechpanos@users.noreply.github.com> Date: Sat, 5 Sep 2026 11:02:00 +0300 Subject: [PATCH] perf: report which path the visible-entity selection took MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The block member index cut the paper sheet's selection from 313 ms to 112 ms but left model space at 296 ms, which is not what a shared per-epoch index should do — the second call in a frame ought to be free. Either the drawing falls into the permissive legacy-DXF case, where the predicate still needs the full walk, or the index is being rebuilt between the two calls. The wires-build line now says which path ran and how many candidates it considered, so one run settles it. Co-Authored-By: Claude Opus 5 --- src/scene/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 8c93fa5bf..9c38d148c 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -8901,6 +8901,9 @@ impl Scene { let sort_cache_ms = crate::perf::elapsed_ms(t_fn); let t_visible = perf.then(iced::time::Instant::now); + // Which path the selection took, and how many candidates it looked at. + let mut visible_path = "quadtree"; + let mut visible_candidates = 0usize; // Phase 2.1 — quadtree-driven candidate selection. When a view // AABB exists (Model layout with a settled camera), only iterate @@ -9200,7 +9203,7 @@ impl Scene { crate::perf_record!( "[perf] wires-build total={:.1}ms sort_cache={:.1} visible={:.1} blk_cache={:.1} \ build={:.1} [classify={:.1} hits={:.1} tess={:.1} materialize={:.1}] sort={:.1}({}) \ -entities={} memo_hit={} memo_miss={} wires={} memo={}", +entities={} memo_hit={} memo_miss={} wires={} memo={} visible_path={} candidates={}", crate::perf::elapsed_ms(t_fn), sort_cache_ms, visible_ms, @@ -9217,6 +9220,8 @@ entities={} memo_hit={} memo_miss={} wires={} memo={}", memo_misses, wires.len(), if memo_active { "on" } else { "off" }, + visible_path, + visible_candidates, ); } wires