Skip to content

Guard shell start to a drawn bar - #15310

Merged
dhh merged 7 commits into
quattrofrom
perf/bar-startup-budget
Oct 14, 2026
Merged

dhh merged 7 commits into
quattrofrom
perf/bar-startup-budget

Conversation

@dhh

@dhh dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What

Plan §2, shell start to a drawn bar. New test/shell.d/bar-startup-budget-test.sh: three cold Quickshell starts in a scratch home, timing until the compositor maps that shell's bar surface at a real size (hyprctl -j layers, namespace omarchy-bar, own pid). Fastest wins; budget 750ms before SPEED_PERCENT scaling, following the theme/menu guard style (measured 151ms here). It certifies the bar surface mapped, not a presented frame or settled widget content — debugBarGeometry only fills in long after the bar is on screen, so it is not the signal.

Scratch shell is isolated like the idle-spawn test: pkill/killall and power-profile commands stubbed, full checkout (shell/config/bin/default) linked.

Verification

  • Passes here with a compositor: ok - shell start reaches a drawn bar within 750ms (151ms), no leaked test shells or watchers after.
  • Codex review (4 passes): session-isolation stubs, PATH prepend, power-profile stubs, default tree; final pass clean.

From plans/overnight-quality.md §2.

@dhh

dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up commit: same scratch-shell isolation the menu guard review required — stay-awake marker (idle service must not screensave/lock the real desktop mid-run) and the bash -lc stub (login shells must not restore the session checkout ahead of the stubs). Test still passes (151ms).

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the scratch-home reset fixes the previous finding.

Summary

This PR adds a budget test for the time from launching Quickshell to its bar surface appearing at a real size.

  • The startup test times when the default bar appears.

Reviews (2) · Last reviewed commit: "Make every startup sample cold" · Reviewed by Greptile

Comment thread test/shell.d/bar-startup-budget-test.sh Resolved
@dhh

dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Greptile addressed: each sample now resets the scratch home (and recreates the stay-awake marker) before launching, so samples 2-3 are cold starts, not restarts skipping first-login work. Still passes here (151ms class).

dhh added 7 commits October 14, 2026 03:22
Time three cold Quickshell starts in a scratch home until the
compositor maps this shell's bar surface at a real size, fastest
wins, scaled to how fast the machine starts processes. 150ms on
this machine; budget 750ms before scaling, in line with the theme
and menu guard budgets' headroom.
@dhh
dhh force-pushed the perf/bar-startup-budget branch from 8a590b4 to 6452fbb Compare October 14, 2026 01:24
@dhh
dhh merged commit 43584ba into quattro Oct 14, 2026
@dhh
dhh deleted the perf/bar-startup-budget branch October 14, 2026 06:03
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

2 participants