Skip to content

test: Speed up Electron unit tests in CI - #333495

Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
agents/ci-performance-analysis-and-improvements
Aug 31, 2026
Merged

test: Speed up Electron unit tests in CI#333495
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
agents/ci-performance-analysis-and-improvements

Conversation

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Summary

Speeds up Electron unit tests that wait for animation frames by preventing the test renderer from being treated as a hidden background window in CI.

  • disable renderer background throttling in the unit-test BrowserWindow
  • show the window without activating it when running in CI
  • preserve the existing hidden-window behavior for local test runs

On Windows, backgroundThrottling: false alone does not prevent Chromium from throttling requestAnimationFrame in a hidden window. In the sampled CI run, 11 frame-driven tests took 94.9 seconds in Electron versus 1.5 seconds in browser tests.

Validation

  • npm run compile
  • targeted hygiene for test/unit/electron/index.js
  • targeted Electron tests under CI conditions: 24 passing in 2 seconds
  • representative test improved from 19.3 seconds in CI logs to 0.3-0.4 seconds locally under CI conditions

Full npm run hygiene could not start on Windows because build/gulpfile.hygiene.ts resolved the repository path as C:\C:\repos\...\remote\package.json; the targeted hygiene check passed.

Keep the unit-test renderer unthrottled and show its window without activating it on CI. This avoids Chromium throttling requestAnimationFrame for a hidden Windows window.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 31, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: None

What changed in this PR

Speeds up Electron unit tests in CI by preventing animation-frame throttling while retaining hidden windows locally.

Changes:

  • Disables renderer background throttling.
  • Shows the CI test window without activating it.
File Description
test/​unit/​electron/​index.js Configures CI-aware test-window visibility and throttling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added the engineering VS Code - Build / issue tracking / etc. label Aug 31, 2026
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit ffad946 into main Aug 31, 2026
54 of 55 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the agents/ci-performance-analysis-and-improvements branch August 31, 2026 14:21
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineering VS Code - Build / issue tracking / etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants