Record the final 1.0 benchmark and GPUI's floor for budget 3 (#32)
CI / core (push) Successful in 1m36s

On the reference laptop, the release build of b8e4927 holds the five
budgets. Minimised, the app skips the paint but GPUI's vsync thread still
wakes the window: by the user's decision, budget 3's CPU limit is GPUI's
floor, 1.1 % minimised and 0.35 % hidden. Budget 4 passes at the
scenario's point only: « Défi » with the grid scrolled to its end still
holds 170-174 MB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0192He3DgZBggc9wJG9c1nqA
This commit is contained in:
nessarandClaude Opus 5.5 committed 2026-11-23 10:58:01 +01:00
1 parent a6b396ab1e
commit 6d2605adfa
2 files changed
+9 -8

No files matched your search

+1
View File
@@ -73,6 +73,7 @@ La 1.0 est une version majeure : son feu vert dépend du benchmark complet de #3
| Commit mesuré | Date | Résultat |
| --- | --- | --- |
| `995f454` (1.0.0-beta.5) | 2026-11-23 | budgets 1, 2, 3 (fenêtre minimisée) et 4 dépassés : pas de feu vert |
| `b8e4927` | 2026-11-23 | budgets 3 et 4 corrigés ; limites des budgets 1, 2 et 3 ramenées aux planchers de GPUI par décision du mainteneur : les cinq budgets tenus, feu vert |
## Publication publique
+8 -8
View File
@@ -10,20 +10,20 @@ Measured on the **reference machine**, on a **release build** (`scripts/prod run
| # | Budget | Limit | Current value | Status |
| --- | --- | --- | --- | --- |
| 1 | Interactions (hover, scroll, sort, filter, moving or resizing the window): cost of one frame | at most **6 ms** at the 99th percentile for a frame drawn (profile build): the 1.0 value, set on 2026-11-23 (#32), to lower after 1.0 (#106); it was 2 ms, aiming for 1 ms | every interaction draws a full frame: 4.0–4.2 ms at the median, 5.7–6.0 ms at the 99th percentile, plus 0.4 ms of presentation (profile build); a window move holds the UI thread 3.7–3.9 ms at the 95th percentile, 4.5–4.7 ms at the 99th (release) | within budget, at the limit |
| 2 | Idle, window visible: CPU | at most **1.1 %** of one core on average: GPUI's floor, set on 2026-11-23 (#32); it was 0.5 % | 0.68–1.11 % (0.89 % over six phases of 30 s), no frame drawn; floor set by GPUI's vsync thread, see below | within budget |
| 3 | Window minimised or hidden | **no rendering**, CPU close to 0, outside an import | no frame drawn either way; hidden in the notification area 0.24–0.29 %, minimised 1.2–1.7 % | rendering within budget; CPU over budget when minimised |
| 4 | Memory, with the full page loaded (every champion and portrait) | at most **150 MB** working set | 164–169 MB working set, 148 MB private from a fresh start; 179 MB and 156 MB after a long session | over budget |
| 5 | Background work (import, following the game client) | threads at **low priority**, never more than **one core** | import of 466 Matches with the client open: at most 12 % of one core in a sample, the work on below-normal threads (1.5 s of CPU, against 0.1 s on normal-priority threads) | within budget |
| 1 | Interactions (hover, scroll, sort, filter, moving or resizing the window): cost of one frame | at most **6 ms** at the 99th percentile for a frame drawn (profile build): the 1.0 value, set on 2026-11-23 (#32), to lower after 1.0 (#106); it was 2 ms, aiming for 1 ms | every interaction draws a full frame: 2.8–3.3 ms at the median, 5.3–5.9 ms at the 99th percentile, plus 0.4–0.5 ms of presentation (profile build); single frames up to 8 ms while scrolling; a window move holds the UI thread 3.3 ms at the 95th percentile, 4.4–4.5 ms at the 99th (release) | within budget, close to the limit |
| 2 | Idle, window visible: CPU | at most **1.1 %** of one core on average: GPUI's floor, set on 2026-11-23 (#32); it was 0.5 % | 0.88–1.08 % over three phases of 30 s, no frame drawn; floor set by GPUI's vsync thread, see below | within budget, close to the limit |
| 3 | Window minimised or hidden | **no rendering**; CPU at most **1.1 %** of one core minimised and **0.35 %** hidden, outside an import: GPUI's floor, set on 2026-11-23 (#32); it was « close to 0 » | no frame drawn either way; minimised 0.98–1.03 %, hidden in the notification area 0.34 % | within budget |
| 4 | Memory, with the full page loaded (every champion and portrait) | at most **150 MB** working set | 146–149 MB working set, 122–123 MB private, at the end of the memory scenario; « Défi » with the home grid scrolled to its end holds 170–174 MB, and 159–163 MB at start | within budget, at the scenario's point only |
| 5 | Background work (import, following the game client) | threads at **low priority**, never more than **one core** | import of 466 Matches with the client open: at most 16.6 % of one core in a sample, the work on below-normal threads (4.8 s of CPU, against 0.4 s on normal-priority threads, none above 1.6 % in a sample) | within budget |
Values of the 1.0 release benchmark: 2026-11-23, reference machine, release build of `995f454` (1.0.0-beta.5) and its `--features profile` build for the frame breakdown, scenarios and details below. No limit was beaten, so none is lowered. The previous values (2026-11-16 and 2026-11-17, issue #17) were 5–7 ms per full frame, 0.3–1.4 % idle and 120 MB working set, before the identity (#80) added the banner, its splash and the portrait cards.
Values of the 1.0 release benchmark: 2026-11-23, reference machine, release build of `b8e4927` (the 1.0's code) and its `--features profile` build for the frame breakdown, scenarios and details below. A first run on `995f454` (1.0.0-beta.5) failed budgets 1 to 4; the app was fixed for budgets 3 (`f53db09`) and 4 (`b8e4927`), and the user set budgets 1, 2 and 3's limits to the floors GPUI sets. No limit was beaten, so none is lowered. The previous values (2026-11-16 and 2026-11-17, issue #17) were 5–7 ms per full frame, 0.3–1.4 % idle and 120 MB working set, before the identity (#80) added the banner, its splash and the portrait cards.
### Release benchmark 1.0 (2026-11-23)
- **Budget 1.** Nothing a frame is asked for is cheap: each window move, hovered row or wheel step draws the whole window, at 60 frames per second (`request_layout` 0.7–1.0 ms, `prepaint` 1.6–2.2 ms, `paint` 0.7–1.3 ms at the median). On « Défi » the card grid's own prepaint takes 1.6–1.8 ms per frame, whether the window moves or the grid scrolls; on « Statistiques » the table's prepaint takes 0.8–1.0 ms and the charts' cached paint 0.3–0.4 ms; the page's layout 0.6 ms when it renders again; the rest is GPUI's own work, in pieces under the 0.5 ms the profile records. Hovering the table costs as much as moving the window: 31 % of one core at 240 moves per second, input waiting up to 5.2 ms at the 99th percentile. Scrolling the home grid draws a frame per wheel step at 4.0 ms median and 5.8–6.0 ms at the 99th percentile. An empty page costs GPUI itself 0.76 ms at the median and 1.41 ms at the 99th percentile (« Défi » with every part hidden, under the move probe); « Défi » without the card grid, 3.58 ms at the 99th percentile. A window move calls GPUI's `Window::bounds_changed`, which refreshes the whole window and bypasses every cached view. 2 ms could not be held without simplifying the page or changing GPUI's behaviour: the user set the limit to the 1.0 value, 6 ms at the 99th percentile, to lower after 1.0 (#106).
- **Budget 2.** The cause of each wake-up, window visible and nothing drawn: GPUI's `VSyncProvider` thread (`gpui-pre-windows`, `platform.rs`) waits on `DwmFlush` at each vsync (61 wakes per second, about 0.3 % of one core) and invalidates every window with `RedrawWindow`; the UI thread then takes a `WM_PAINT` at each vsync (67 wakes per second, 0.4–0.7 %), runs GPUI's frame callback, finds nothing to draw and draws nothing. The app's own threads wake about once per second (under 0.05 %). This floor, 0.7–1.1 %, cannot be lowered without modifying GPUI (ADR-0004): as #32 provides, it became budget 2 on 2026-11-23, by the user's decision. It is lowered as soon as GPUI's floor drops (ratchet).
- **Budget 3.** Hidden in the notification area, the UI thread never wakes; GPUI's vsync thread alone still does, 61 times per second (0.24–0.29 %). Minimised, the vsync thread keeps invalidating the window (it only skips the frame signal for an iconic window) and the UI thread wakes about 89 times per second without drawing: 1.2–1.7 %, more than visible. Fixed after the benchmark: while the window is minimised, a subclass validates each `WM_PAINT` before GPUI sees it (`minimized.rs`), as GPUI has no frame to draw then. On the manual checks machine (240 Hz, for information), minimised: 3.03 % of one core before, 0.22 % after, the UI thread 469 ms then 31 ms over 21 s; to measure again on the reference machine.
- **Budget 4.** With the full page loaded, the process commits about 108 MB of GPU memory, held in system memory on this integrated GPU (86–94 MB shared). Hiding parts with the profile build (`ARENA_TRACKER_HIDE`) splits the private memory: about 40 MB for the home grid's portraits, about 25 MB for the champion table, and 106 MB with both hidden, mostly GPUI's renderer (swap chain, atlases). The working set keeps 177 MB while the window is hidden.
- **Budget 3.** Hidden in the notification area, the UI thread never wakes; GPUI's vsync thread alone still does, 61 times per second (0.24–0.29 %). Minimised, the vsync thread keeps invalidating the window (it only skips the frame signal for an iconic window) and the UI thread wakes about 89 times per second without drawing: 1.2–1.7 %, more than visible. Fixed after the benchmark: while the window is minimised, a subclass validates each `WM_PAINT` before GPUI sees it (`minimized.rs`), as GPUI has no frame to draw then. On the manual checks machine (240 Hz, for information), minimised: 3.03 % of one core before, 0.22 % after, the UI thread 469 ms then 31 ms over 21 s; to measure again on the reference machine. On the reference laptop, `b8e4927`: minimised 0.98–1.03 %, the UI thread still woken 65–66 times per second, about 85 µs per wake against about 5 µs on the manual checks machine: the paint is skipped, not the wake GPUI's vsync thread causes. Minimised now costs what visible idle does, GPUI's floor: by the user's decision, the limit is 1.1 % minimised and 0.35 % hidden. Hiding the window when minimised would remove its taskbar button and its Alt+Tab entry, and was not taken.
- **Budget 4.** With the full page loaded, the process commits about 108 MB of GPU memory, held in system memory on this integrated GPU (86–94 MB shared). Hiding parts with the profile build (`ARENA_TRACKER_HIDE`) splits the private memory: about 40 MB for the home grid's portraits, about 25 MB for the champion table, and 106 MB with both hidden, mostly GPUI's renderer (swap chain, atlases). The working set keeps 177 MB while the window is hidden. Fixed after the benchmark: the champion table read its 128 px portraits through GPUI's app-wide cache, which keeps every image it loaded; it reads them through its own `CardImages` now (`b8e4927`). On the reference laptop, the scenario's end went from 164–169 MB to 146–149 MB working set (122–123 MB private). The scenario ends on « Statistiques », where the home grid's portraits are given back: « Défi » with the grid scrolled to its end still holds 170–174 MB, and 159–163 MB at start.
- **Budget 5.** Following the client (open throughout) and importing a whole history into an empty data folder, with its 175 card portraits and splashes: the work ran on the two follower threads and the art download thread, all below normal. Threads at normal priority showed at most 1.1 % in a sample; threads born and gone between two samples (up to 5 % in a sample, priority unknown) match the short DNS thread `ureq` starts per request, which `worker.rs` already notes runs at normal priority.
- **Not measured: scrolling a champ select.** It needs a live Arena champ select in the game client; the captured one replays only in GPUI's test context, which draws nothing. Scrolling the home grid, which shares its cost structure, is the nearest value: 4.0 ms per frame at the median, 6.0 ms at the 99th percentile. To measure at the next champ select (see Measuring).