Skip to content

feat(hyprburst): add opt-in hotpath profiling and latency probe - #79

Merged
piny4man merged 1 commit into
mainfrom
feat/hotpath-profiling
Oct 17, 2026
Merged

piny4man merged 1 commit into
mainfrom
feat/hotpath-profiling

Conversation

@piny4man

Copy link
Copy Markdown
Owner

Hyprburst part of NUKE-109: adopt hotpath as the standard profiling harness and record a baseline.

Changes

  • hotpath / hotpath-alloc cargo features (no-op and dependency-free by default) instrument the open, query, selection, and render paths. The Rio parent, Rio PTY child, native, and TUI each have their own profiling scope. The child's report goes to <path>-tui-<pid>, off the PTY.
  • HYPRBURST_PERF=1 probe prints hyprburst-perf <metric> <frontend> <ms> lines for first-present, first-content-present, query-input-to-present, and selection-input-to-present. scripts/perf-summary.sh turns them into n / median / p95 / max.
  • examples/query-cost.rs: offscreen query and selection cost.
  • CI runs clippy and tests under both features.
  • Run procedure: docs/hotpath-profiling.md. Baseline and ranked findings: docs/hotpath-findings.md.

Baseline (balanced vs performance, n ≥ 30)

  • Query and selection p95 is ≤ 1.93 ms in balanced: passes the 50 ms target.
  • First-content p95 change from performance to balanced: cold native +9.3%, cold Rio +7.7%, warm Rio +6.3%, warm native +14.1% (fails the 10% target).
  • Top costs: resolve_fonts takes about 42 ms (fontconfig spawns and an fc-list scan) and GlState::new about 29 ms. Rio also shows an empty panel for about 30 ms before its content appears.

Fixes are follow-ups. Drafted issues are listed in the findings doc.

Validation

cargo fmt --check; clippy -D warnings with default and all features; cargo test --all-targets with default, hotpath, and hotpath-alloc features (314 / 315 / 315 passed).

NUKE-109 needs repeatable numbers for cold/warm first presentation and
query/selection latency across power profiles, without costing the
default build anything.

- `hotpath` / `hotpath-alloc` features instrument the open, query, and
  render paths; per-process guards cover the Rio parent, the PTY child
  (report redirected off the PTY), native, and the TUI.
- `HYPRBURST_PERF=1` prints first-present, first-content-present, and
  query/selection input-to-present samples; scripts/perf-summary.sh
  summarises them.
- examples/query-cost.rs measures query and selection cost offscreen.
- With the probe on, --measure reports after content is presented, so
  its `cargo tree` footprint probe no longer delays the Rio child.
- CI runs clippy and tests with both features.
- docs/hotpath-profiling.md documents the procedure;
  docs/hotpath-findings.md records the baseline and ranked findings.
@piny4man
piny4man merged commit 9554c90 into main Oct 17, 2026
1 check passed
@piny4man
piny4man deleted the feat/hotpath-profiling branch November 11, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant