#68 Make panning, zooming and pinching meet the 150 ms budget at the documented sizes
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#68
- issue
- state:closed
The UI benchmarks (#51, `bench/ui.mjs`) show that navigation is the one area that misses its budgets: view changes and the longest frame in a gesture should both stay within 150 ms. Discrete actions, such as opening a moment, typing, saving and searching, stay well within budget almost everywhere. Medians on a Ryzen 7 7730U laptop in headless Chromium (`docs/benchmarks.md#interactions`): | | Browser 1,000 | Browser 4,000 | Browser 10,000 | ×4 CPU 1,000 | Platform 10,000 | Platform 100,000 | |---|---:|---:|---:|---:|---:|---:| | Wheel zoom (to the view drawn) | 135 ms | **215 ms** | **279 ms** | **350 ms** | **316 ms** | 44 ms | | Drag to pan (longest frame) | 83 ms | 150 ms | **217 ms** | **350 ms** | **183 ms** | 17 ms | | Pinch zoom (longest frame) | 83 ms | **233 ms** | **300 ms** | **367 ms** | **233 ms** | 17 ms | **Observations:** - **The cost follows what is drawn, not what is stored.** The platform is fast at 100,000 moments, where the view collapses into summaries, and slow at 10,000, where many labels are drawn. - **Each zoom step costs a full redraw.** At 1,000 moments, frames during wheel zooming are 67–83 ms each, one per step (the drag frames are 33–50 ms). So a smooth 50 ms frame budget is out of reach until per-step drawing is cheaper. - **Opening a new duration** costs 135 ms at 10,000 moments in the browser and 193 ms on a 4× throttled CPU at 1,000, for the same reason: it redraws. **Directions to evaluate (profile first):** - During a gesture, move already-drawn markers with a transform, and lay labels out again only when the gesture settles or grouping changes. - Reuse label nodes across frames, and avoid layout reads during drawing. - Limit how many individual labels are laid out per frame, and settle the rest after the gesture. **Done when:** `bench/ui.mjs` shows navigation within budget at the comfortable sizes, for both the browser at full speed and the throttled browser (see #69 on calibrating those sizes). The CI gate can then move to larger sizes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://github.com/openchronology/timeline-app/issues/68
Related
- #102 Advise by how long users wait for views; recalibrate comfortable sizes
- #104 Make navigation meet its budget: stop forcing layout while drawing
- #127 Cancel and undo moment edits without rebuilding indexes, and drop the blurred backdrop
- #51 thorough ui benchmarks verifying user interaction within thresholds defined by systems benchmarks
- #69 Capacity advice should measure what users wait for, then recalibrate comfortable sizes
- #70 UI interaction benchmarks against the capacity budgets (browser and platform)
- #74 UI benchmarks on the desktop app, plus two desktop fixes
- Raise the comfortable sizes now that navigation meets its budget
- Benchmark UI interactions against the capacity budgets
- Redraw only what a moving view changes in bands and arcs
- Drive the desktop app in the UI benchmarks
- Recalibrate comfortable sizes and gate the advice past them in CI
- Cancel and undo moment edits without rebuilding indexes, and drop the blurred backdrop
- Stop forcing layout and style recalculation while drawing frames