perf: report which path the visible-entity selection took

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 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-05 18:53:01 +03:00
1 parent efcd73727f
commit 67ea5fa2dc
1 file changed
+6 -1
+6 -1
View File
@@ -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