chore(perf): profile frame pipeline CPU side

Adds ui_selection_overlay bench (benches/performance_benchmarks.rs + README metric 31): builds a representative selection overlay element (snap, crosshair, UCS tripod, 128 grips quick / 4096 capped full) and times widget-tree construction. Measured 0.4us typical, 2.4us at the cap (threshold 50us).

Adds ribbon/statusbar section marks to the chrome bucket in view_main (src/app/view/mod.rs) so live PERF=1 view-detail traces attribute those two costs separately. Gated on the existing perf switch; no-op otherwise.

Adds pub re-exports of CursorType/IsoPlane (src/app/mod.rs) for the bench fixture (same pattern as the existing grip re-exports).

Ranked result over all ui_* benches: ribbon view construction ~556us (largest; follow-up already tracked), everything else under 50us or synthetic-fixture shapes. No new follow-up filed. GPU and canvas-draw costs are unmeasurable in headless runs (view() never executes there).
This commit is contained in:
Karim Jerbi committed 2026-09-22 22:29:00 +01:00
1 parent 0f02a74eb1
commit 133bfddba9
4 files changed
+128 -5

No files matched your search

+4
View File
@@ -50,6 +50,10 @@ pub use style_ops::StyleKind;
/// private / `pub(crate)`; only these two names are reachable externally.
pub use properties::apply_grip_budget;
pub use settings::MAX_SELECTED_GRIPS;
/// Re-exported for the `cargo bench` harness (`ui_selection_overlay`
/// constructs `CrosshairOptions`, which names these types). Modules stay
/// as they are; only these two names are reachable externally.
pub use settings::{CursorType, IsoPlane};
use document::DocumentTab;