Repository navigation
perf(overlay): Add Windows frame-cadence bench and record a Linux ride - #1263
Conversation
Co-authored-by: Oded Messer <odedmesser@gmail.com>
Co-authored-by: Oded Messer <odedmesser@gmail.com>
Co-authored-by: Oded Messer <odedmesser@gmail.com>
Co-authored-by: Oded Messer <odedmesser@gmail.com>
Co-authored-by: Oded Messer <odedmesser@gmail.com>
Soft Open Soft-FIXTip: Soft ledger
Soft-FIX (once per tip → Coder)
Soft notes (not Soft-FIX)
Soft Open Soft-FIX. Comment-only. Never merge without Oded yes. — Cursor agent (Architect), on @omesser's behalf. |
|
PowerShell 7.4.6 parsed the script with no errors. A drain of New tip — Cursor agent (Coder), on @omesser's behalf. |
Why
Issue #426 asks for frame-cadence histograms on every platform, including a ride on a moving window and a crossing of a display seam. macOS and Linux idle, walking, and load tables are already on main. Windows had no cadence script. A ride and a seam were unmeasured.
What changed
scripts/bench-frame-cadence-windows.ps1launches fidget on a Windows desktop foridle,idle-quiet,walking,load, andmatrix. It requiresFIDGET_BENCH_GREEN_LIGHT=1, copies stderr in line order into a UTF-8 LF log, and prints the report fromscripts/frame-cadence.mjs. Stdout is drained and discarded so a full pipe cannot stall the process. Load is one hiddenpowershellloop per core, because Windows does not shipyes. The script does not add a riding scenario, and it does not change the overlay or the macOS driver.The baseline records one Linux ride from the release binary built at
543dad19on this VM. A glidingxtermproduced 392hold#frames at 262 positions.scripts/frame-cadence.mjsprinted the table. A display seam was not measured. This VM has one screen. No Windows histogram is in the doc, because no Windows machine ran the script.How to verify
On Linux,
pwsh -File scripts/bench-frame-cadence-windows.ps1 idleexits 2 and asks for the green light. WithFIDGET_BENCH_GREEN_LIGHT=1the same command exits 2 becauseOSis notWindows_NT.pre-commitran PSScriptAnalyzer on the script and it passed.A stub process wrote
one,two, andthreeto stderr andnoiseto stdout. The reader kept the three stderr lines in that order, as UTF-8 with LF endings, and dropped the stdout line.nodeevaluatesNumber("1.5\r")as1.5, so a trailing CR is not what breaks the analyzer.The riding numbers come from
target/release/fidgetonDISPLAY=:1, still BMO, andxdotool windowmovefor 20 seconds. The analyzer table is indocs/research/performance-baseline-v1.md. A recount of that log found 392hold#frames, all at y=806, with x from 769 to 1177.On Windows, after the operator agrees, run
scripts\bench-frame-cadence-windows.ps1 matrix -Seconds 20 -Bin target\release\fidget.exefrom the repo root.Notes
#426 stays open. The seam and the Windows tables are still missing. The idle-quiet fall wait is 5 seconds, and the sample waits another 1500 ms for the overlay flush. Neither wait is named.
— Cursor agent (Coder), on @omesser's behalf.