Repository navigation
Description
Context
Desktop buddy must not harm system performance. Suspect idle wakeups and GPU compositing of transparent overlays cost too much. This parent tracks the benchmarking plan before any optimization work.
Architecture (from review)
Rust engine tick (~16ms sleep target) → frame loop → per-display transparent Tauri webview (rAF) → platform overlay / compositor.
Overlay/pet is not GTK drawing. Cost is continuous process wakeups + fullscreen-ish transparent window compositing.
Top suspects (unmeasured)
- Unconditional ~60Hz wakeups — frame loop keeps ticking when the sprite is still / user AFK
- GPU compositing — transparent always-on-top overlays re-composited every vsync
- WindowSource polling (macOS) —
CGWindowListCopyWindowInfoat 10–60Hz; scales with open window count - Per-pixel click-through mask rebuild (Windows / X11) on animation frames
Full write-up path (may still be local-only): docs/research/drawing-engine-performance.md
Child benchmarks
| # | Focus |
|---|---|
| #431 | CPU wakeups & idle (macOS) |
| #432 | CPU wakeups & idle (Linux) |
| #429 | GPU compositing (macOS Metal) |
| #430 | GPU compositing (Windows DWM) |
| #425 | GPU compositing (Linux X11/Wayland), out of V1, below |
| #427 | WindowSource poll cost at scale (macOS) |
| #428 | Click-through mask rebuild (Windows/X11) |
| #424 | Memory (RSS) & multi-monitor scaling |
| #426 | Frame cadence & dropped frames, out of V1, below |
Each child specifies tools, scenarios (idle perched / walking / chat open / multi-monitor), metrics, and acceptance = baseline numbers in a doc/PR.
Out of V1: needs Linux plus GPU or multi-monitor hardware. These don't count toward V1 done. They stay open with no milestone until a bare-metal Linux machine with a GPU or multiple monitors is available:
- perf: Benchmark GPU compositing overhead on Linux (X11 and Wayland) #425 Linux GPU compositing: GPU% per scenario and compositor, the Wayland row, the multi-monitor scenario and compositor frame rate all need Linux GPU or multi-monitor hardware.
- perf: Benchmark frame cadence and dropped frames (all platforms) #426 Linux display seam: the only perf: Benchmark frame cadence and dropped frames (all platforms) #426 item left, and it needs a Linux setup with two monitors. The macOS, Windows and single-display Linux rows are done.
Out of scope here
- Implementing optimizations (open after baselines)
- Controlled battery runs (defer until we have CPU/GPU numbers)
- Wayland-native (still X11-first for V1)
Done when
- Child baselines filled in
- Top 3 optimization targets ranked from data
- Results in
docs/research/performance-baseline-v1.md
— Cursor agent, on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
omesser commentedon Sep 6, 2026
Existing fix track (do not duplicate)
#183 already owns the unconditional 60Hz frame-loop poll — the top idle-cost suspect in this plan. It is a Stage 1 permission spike (macOS mouse-only
CGEventTap) then Stage 2 event-driven input / two-clock scheduler (timer only while motion needs it; block onrecv()when still). Research:docs/research/event-driven-input-vs-polling.md(#241).How the new issues relate
Treat #183 as the leading optimization ticket for wakeups; this parent stays measurement + ranking.
— Cursor agent, on @omesser's behalf.
perf: Add Linux baseline measurements for CPU wakeups (issue #432)
omesser commentedon Sep 23, 2026
Progress (not done)
#927 added the Linux section of
docs/research/performance-baseline-v1.md(idle perched + no-buddy baseline on a headless Ubuntu VM).Child #432 stays open: full scenario matrix / C-states / real-desktop powertop still needed. Other children unchanged. This parent stays open until child baselines fill in and top targets are ranked.
— Cursor agent (Coder), on @omesser's behalf.
Add X11 mask rebuild baseline measurements (#428)
Add X11 mask rebuild baseline measurements (#428)
docs(perf): Record the macOS GPU compositing matrix
omesser commentedon Sep 26, 2026
Progress (not done)
#1034 closed child #429: macOS Metal GPU compositing matrix is on
mainindocs/research/performance-baseline-v1.md(plusscripts/bench-gpu-compositing-macos.sh). Predicted idle GPU cost and multi-monitor doubling are refuted on the measured machine; hide-rule saving shows up as engine ticks, which keeps ranking pressure on wakeups.Sibling status after this merge: closed #429 / #430 / #431; open #424 / #425 / #426 / #427 / #428 / #432. This parent stays open until remaining child baselines fill in and top targets are ranked.
— Cursor agent (Coder), on @omesser's behalf.
omesser commentedon Sep 26, 2026
Progress (not done)
#1042 partially landed child #427: WindowSource poll matrix (idle/riding × ~55 / ~155 windows) is on
mainindocs/research/performance-baseline-v1.md, with the bench scripts. Screenshot + plotted curve still open on #427; flood helper is #1043.Sibling status after this merge: closed #429 / #430 / #431; open #424 / #425 / #426 / #427 / #428 / #432. This parent stays open until remaining child baselines fill in and top targets are ranked.
— Cursor agent (Coder), on @omesser's behalf.
omesser commentedon Oct 1, 2026
Completed — #1203 on
mainMerge:
d85fa2a12a501187f1d1da843bc86c0366601025.Acceptance for this parent is met on
main:docs/research/performance-baseline-v1.md(closed children cited; open children have measured rows or an explicit unavailable reason).--bin/XAUTHORITYfixes in the same PR.Open children (#432, #425, #428, #424, #426) keep their leftover measurement gaps — those are separate jobs, not blockers for this parent.
— Cursor agent (Coder), on @omesser's behalf.
omesser commentedon Oct 23, 2026
Post-merge check after #1798 (merged at
350dcece). Each "Done when" item, checked againstdocs/research/performance-baseline-v1.mdon main:Ticked all three. The issue stays closed as completed.
One small doc drift, not a blocker: the status table still lists #424 as "Open" (L38), but #424 is closed.
— Cursor agent (P. Coder), on @omesser's behalf.