Calendar: reduce busy Week and Month scroll frames without opening regressions #1230

Open
opened 2026-10-06 21:19:43 +00:00 by kayg · 2 comments
Owner

Performance follow-up to #1124, round 2. Week and Month remain slow to scroll on the shared perf VM (4× Chromium CPU throttle, macOS platform, real production build). Fixture: 5,000 Files, 240 API-created Logs and 121 asserted provider Events. Full HDD scope: 8 ms delay, 200 IOPS, 150 MB/s. Each run uses perf-run and records load inside the lock.

The ready-view five-pair phase, unchanged Calendar baseline: Week synthetic native-scroll frame p50 / p95 / max 73 / 121.9 / 222.1 ms; Month 90.3 / 138.1 / 949.5 ms. These are 450 programmatic scroll steps per condition, not physical wheel input. The paint-only candidate improved frames but regressed opening p95 (Week 9156.99 → 13554.42 ms; Month 3964.84 → 4094.23 ms), and was reverted. Three earlier variants also failed opening p95. Do not revive a variant based only on frame gains.

Evidence: docs/perf/2026-10-06-1124-round2.md and runs/2026-10-06-1124-round2-calendar-ready-paint.json. Separate marked Chrome traces are retained in the job worktree. Continue source-attributed style/paint investigation with bounded shared materials and no runtime layout loops. Use five interleaved pairs and retain only ≥10% p50 gains without p95 regression. Performance findings only; no crash, data loss or authorization finding.

Performance follow-up to #1124, round 2. Week and Month remain slow to scroll on the shared perf VM (4× Chromium CPU throttle, macOS platform, real production build). Fixture: 5,000 Files, 240 API-created Logs and 121 asserted provider Events. Full HDD scope: 8 ms delay, 200 IOPS, 150 MB/s. Each run uses perf-run and records load inside the lock. The ready-view five-pair phase, unchanged Calendar baseline: Week synthetic native-scroll frame p50 / p95 / max 73 / 121.9 / 222.1 ms; Month 90.3 / 138.1 / 949.5 ms. These are 450 programmatic scroll steps per condition, not physical wheel input. The paint-only candidate improved frames but regressed opening p95 (Week 9156.99 → 13554.42 ms; Month 3964.84 → 4094.23 ms), and was reverted. Three earlier variants also failed opening p95. Do not revive a variant based only on frame gains. Evidence: docs/perf/2026-10-06-1124-round2.md and runs/2026-10-06-1124-round2-calendar-ready-paint.json. Separate marked Chrome traces are retained in the job worktree. Continue source-attributed style/paint investigation with bounded shared materials and no runtime layout loops. Use five interleaved pairs and retain only ≥10% p50 gains without p95 regression. Performance findings only; no crash, data loss or authorization finding.
Author
Owner

The corrected source-profile join resolves the busiest application frame (n, chunk CJ7zw-1o.js line 102 column 16730) to the shared ModeHeader.svelte scroll capture handler around lines 296–310. Its self time is 81.41 ms in the separate Week scroll trace and 312.47 ms in Month. Native (program) accounts for 2229.56 / 1538.40 ms respectively. These instrumented weights are diagnostics, not latency samples. Calendar cheap-paint lowered whole-phase main-thread CPU, but failed the opening p95 rule. Raw phase summaries now retain source frames; bench/chrome-phase-1124.test.py verifies cross-thread sampler linkage.

The corrected source-profile join resolves the busiest application frame (`n`, chunk CJ7zw-1o.js line 102 column 16730) to the shared `ModeHeader.svelte` scroll capture handler around lines 296–310. Its self time is 81.41 ms in the separate Week scroll trace and 312.47 ms in Month. Native `(program)` accounts for 2229.56 / 1538.40 ms respectively. These instrumented weights are diagnostics, not latency samples. Calendar cheap-paint lowered whole-phase main-thread CPU, but failed the opening p95 rule. Raw phase summaries now retain source frames; `bench/chrome-phase-1124.test.py` verifies cross-thread sampler linkage.
Author
Owner

Round 2 Calendar bug bash profile (local host; perf VM was reserved by another job, so no VM measurements were made). The real production build used the existing 1440×900 Week fixture with 120 provider Events, 4× Chromium CPU throttle, and captured Chrome traces. Host load at profile start was 36.8 / 44.7 / 46.9.

  • Vertical scroll through the Week: frame p50 100 ms, p95 183.4 ms, 24 long animation frames, 0 long tasks; 2 layout events totaling 3.2 ms, 27 style recalculations totaling 35 ms. Target p95 <16.7 ms was not met.
  • Horizontal fling: frame p50 83.3 ms, p95 450 ms; max layout event 43.8 ms, style recalculation 491.4 ms total, and 282 dirty objects at most.
  • The profiler's isolated Week grid probe reported 306 ms in getBoundingClientRect and 55 ms in cloneNode over the synthetic fling. The route bundle maps this work to shared Calendar TimeGrid/grid code. The shared primitive owner rule blocks edits from this Calendar Tab bug-bash job, so this remains an attribution finding for the existing performance follow-up.

Evidence: artifacts/bash-calendar/round2-perf.json; trace files in artifacts/bash-calendar/round2-perf/. The profile runs on a host with heavy unrelated load and 4× CPU throttle; treat these numbers as local attribution evidence, not a clean perf-VM comparison. No code change was made.

Round 2 Calendar bug bash profile (local host; perf VM was reserved by another job, so no VM measurements were made). The real production build used the existing 1440×900 Week fixture with 120 provider Events, 4× Chromium CPU throttle, and captured Chrome traces. Host load at profile start was 36.8 / 44.7 / 46.9. - Vertical scroll through the Week: frame p50 100 ms, p95 183.4 ms, 24 long animation frames, 0 long tasks; 2 layout events totaling 3.2 ms, 27 style recalculations totaling 35 ms. Target p95 <16.7 ms was not met. - Horizontal fling: frame p50 83.3 ms, p95 450 ms; max layout event 43.8 ms, style recalculation 491.4 ms total, and 282 dirty objects at most. - The profiler's isolated Week grid probe reported 306 ms in `getBoundingClientRect` and 55 ms in `cloneNode` over the synthetic fling. The route bundle maps this work to shared Calendar TimeGrid/grid code. The shared primitive owner rule blocks edits from this Calendar Tab bug-bash job, so this remains an attribution finding for the existing performance follow-up. Evidence: `artifacts/bash-calendar/round2-perf.json`; trace files in `artifacts/bash-calendar/round2-perf/`. The profile runs on a host with heavy unrelated load and 4× CPU throttle; treat these numbers as local attribution evidence, not a clean perf-VM comparison. No code change was made.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1230
No description provided.