Skip to content

perf: keep the scan's analysis between shots, and share e2e example copies - #48

Merged
koji-1009 merged 2 commits into
mainfrom
perf/e2e-speed
Nov 1, 2026
Merged

koji-1009 merged 2 commits into
mainfrom
perf/e2e-speed

Conversation

@koji-1009

Copy link
Copy Markdown
Owner

The e2e job took over nine minutes of CI, and every shot resolved Flutter from scratch: about three seconds before anything rendered, paid again on each shot even within one process.

How it works

  • Scanner keeps the analysis of a project between scans in one process. A later scan of the same project tells the analyzer only of the files that changed since: every file an earlier scan read, through imports, exports, and parts, is compared by modification time and size, including files that were missing then.
  • A scan builds the analysis anew when the project, the SDK, package_config.json, or analysis_options.yaml changed; the replaced analysis is disposed of once the scans using it end.
  • shot from Dart and the e2e tests, which run shutter in process, gain from it; the CLI runs once per process and behaves as before.
  • The e2e tests of a file that only add preview files now share one copy of example/, so the copy, pub get, its compiled test, and its analysis carry over from test to test. Tests that replace or delete the shell, add a package, or need an empty google_fonts cache keep their own copy.

Measured locally

before after
shot of the same file again, in one process 4.4 s 1.6 s
shot of five preview files, after another shot 4.8 s 2.2 s
dart test -P e2e 2 min 38 s 1 min 35 s

🤖 Generated with Claude Code

koji-1009 and others added 2 commits November 1, 2026 21:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@koji-1009
koji-1009 merged commit 1f987fa into main Nov 1, 2026
10 checks passed
@koji-1009
koji-1009 deleted the perf/e2e-speed branch November 1, 2026 13:27
@koji-1009 koji-1009 mentioned this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants