Speed up component fixture execution - #335942
Speed up component fixture execution#335942Dmitriy Vasyura (dmitrivMS) wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The optimization preserves diagnostic locations, leak detection, and test isolation with focused regression coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Optimizes component fixture execution by lazily formatting diagnostic stacks and parallelizing independent Playwright tests.
Changes:
- Defers disposable and timer stack formatting until diagnostics access it.
- Warms source-map support before asynchronous fixture rendering.
- Enables parallel Playwright test execution and adds regression coverage.
| File | Description |
|---|---|
test/componentFixtures/playwright/playwright.config.ts |
Enables full test parallelism. |
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts |
Warms source maps and lazily exposes idle-task stacks. |
src/vs/base/test/common/virtualScheduling/virtualTimeApi.ts |
Lazily formats virtual timer stacks. |
src/vs/base/test/common/virtualScheduling/virtualScheduling.test.ts |
Tests lazy formatting and scheduling locations. |
src/vs/base/test/common/virtualScheduling/trace.ts |
Allows traces to retain unformatted errors. |
src/vs/base/test/common/virtualScheduling/recordingTimeApi.ts |
Lazily formats recorded timer stacks. |
src/vs/base/test/common/lifecycle.test.ts |
Adds disposable-tracker regression coverage. |
src/vs/base/common/lifecycle.ts |
Defers allocation-stack formatting until leak reporting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Screenshot ChangesBase: Changed (4)13 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. |
Defer diagnostic stack formatting until leak or timer reports need it, while retaining allocation sites and cold-start source-map initialization. Balance independent Playwright cases across the existing worker pool. Reduce local full-workload execution from 672.53s to 409.24s without skipping fixtures, tests, or leak checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevent resize and theme redraws from advancing the stopped waveform. Reset elapsed-time tracking on resume and cover reduced-motion canvas stability after resizing in both themes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Accept the four reviewed PromptMigration and ToolsTabNarrow hashes from Component Fixtures run 34681353165. Keep all Voice baselines unchanged; its reduced-motion instability is fixed separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3229124 to
644d741
Compare
|
Fixed the Voice screenshot instability rather than accepting its animated frame. The fixture already requests reduced motion. The bug was in the canvas animator: resize/theme redraws still advanced the waveform from elapsed wall-clock time even after the animation loop stopped. Redraws now keep the waveform still while stopped, and resuming starts with a fresh timestamp. Validation after rebasing onto the CI-tested main revision:
Accepted only the four reviewed non-Voice hashes for PromptMigration and ToolsTabNarrow. No Voice baseline was accepted or changed. The previous CI run also confirms the performance improvement with the full workload: 2,213 screenshots and 43 interaction tests completed without render/test errors, reducing Component Fixtures from 20m17s to 12m00s (about 41%). That run failed only on the four baseline mismatches. The new run will verify the follow-up. |
Use the four CI-uploaded PromptMigration and ToolsTabNarrow images from run 34685399713. Reviewed differences are limited to 1-4 antialiasing pixels per image, with no content or layout changes and no fixture errors. Leave Voice and all other baselines unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Updated the four remaining blocking hashes from the actual Linux screenshots uploaded by CI run 34685399713. Reviewed differences versus the previously accepted images:
No content/layout changes, no fixture errors, and no remaining Voice diff. The exact screenshotBlocksCi checker passes against the CI manifest and the staged Git blob (Linux line endings). No tolerances or checks were weakened. The run-to-run pixel variation is still a potential source of baseline flakiness; this update matches the latest CI artifacts, but a new run must confirm the result. |
Reveal the two unstable headless fixtures after asynchronous setup and virtual-time layout finish, avoiding retained intermediate paint states. Keep layout callbacks, interactive behavior, leak detection, and strict screenshot comparison unchanged. Add exact-byte remount regression coverage for both fixtures and themes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Investigated the layout/animation path before changing comparison. No comparison tolerances or baselines are changed in this follow-up. Both views perform initial virtualized-list sizing and scrollbar updates on animation frames. I traced all paint-relevant styles, bounds, and scroll positions for all 420 Tools and 867 PromptMigration DOM elements. Once render reported ready, those values stopped changing; the only later mutations came from Playwright temporarily hiding input carets. Waiting longer did not repair the different images. The useful distinction was initial painting: mounting and painting intermediate layout states could leave different edge pixels even after the final DOM converged. A fresh paint from the completed layout was stable. Holding the fixture transparent during async setup also made repeated renders stable without preventing layout measurements or observer callbacks. Added an opt-in Validation:
CI will now run the same strict remount regression on Linux, alongside the unchanged baseline comparison. If a canonical first-paint image differs from the old baseline, it must be reviewed from that run; another noisy hash refresh is not being assumed to solve this. |
Remove the two Playwright specs as requested and restore the helper to its original private scope. Preserve the performance and fixture stabilization fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Accept the four first-paint baseline hashes after two complete Linux CI runs of the same commit produced identical images for all 2,213 fixtures. The exact baseline checker passes against both manifests. Keep strict comparison and the requested test removals unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Cross-run verification succeeded: attempts 1 and 2 of Component Fixtures run 34691730536 rendered the exact same commit and produced identical SHA-256 hashes for all 2,213 screenshots, with zero render errors and all 43 remaining interaction tests passing. This includes all four previously unstable ToolsTabNarrow/PromptMigration images. The job was still failing because their committed baselines predated the stabilized first paint. Updated only those four reviewed baselines in 972cc12. The unmodified screenshotBlocksCi checker passes against both independently captured CI manifests using the committed LF-normalized baseline content. No tolerances were changed and the two requested test files remain removed. The next CI run checks the now-aligned baselines end to end. |
Speed up the full Component Fixtures workload without skipping checks, fixtures, or leak detection.
Motivation and measurements
The Component Fixtures job on #335932 took 20m17s, including 13m05s capturing screenshots and 5m44s running interaction tests. Profiling identified eager source-mapped diagnostic stack formatting as a major rendering cost.
Local before/after measurements used the same Windows checkout, Chromium version, complete fixture list, two Playwright workers, and an already-running fixture server: