perf: remove large drawing stalls

Keep resident geometry and GPU resources stable across edits, MSPACE zoom, and Model/Paper switches. Add unified PERF output for tracing remaining costs.
This commit is contained in:
Hakan Seven committed 2026-07-25 13:34:48 +03:00
1 parent 2bc4c1c8f3
commit 12bf126646
26 files changed
+795 -326

No files matched your search

+2 -2
View File
@@ -748,7 +748,7 @@ impl InteractionIndex {
pub fn build(wires: &[WireModel]) -> Self {
#[cfg(not(target_arch = "wasm32"))]
let perf = std::env::var_os("OCS_PERF").is_some();
let perf = crate::perf::enabled();
#[cfg(not(target_arch = "wasm32"))]
let build_started = std::time::Instant::now();
let wire_handles: Vec<Option<u64>> = wires
@@ -930,7 +930,7 @@ impl InteractionIndex {
);
#[cfg(not(target_arch = "wasm32"))]
if perf {
eprintln!(
crate::perf_record!(
"[perf] interaction-index-detail total={:.1}ms handles={:.1} collect={:.1} flatten={:.1} spatial={:.1}",
build_started.elapsed().as_secs_f64() * 1000.0,
handles_elapsed.as_secs_f64() * 1000.0,