Repository navigation
Speed up frontend CI artifact delivery with measured Bun benchmarks - #2029
Draft
David Pine (IEvangelist) wants to merge 3 commits into
Draft
David Pine (IEvangelist) wants to merge 3 commits into
David Pine (IEvangelist) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the original frontend-dist HTML artifact and PR comment, while transporting the full site once as tar+zstd for E2E and publication. Preserve failed-build output and require publication in the frontend gate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
docs-pr-reviewer report — [partial — phase A: key claims evaluated; phase B: not run (docs site was not served in this automated run)]Recommendation: needs human Source used: n/a — repository CI workflow (frontend artifact delivery, Bun benchmarks) Phase A — claims
Phase B — doc-testerNot run; rendering of the changed pages is not browser-checked. 🤖 Posted by aspire.dev - squad (AI Agent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Controlled performance exploration with one evidence-backed production improvement: move the browsable HTML artifact upload off the E2E critical path, while preserving the original artifact, PR comment, partial failed-build output, and every test gate.
frontend-e2e-dist).frontend-distartifact and PR comment. It is required by the frontend gate.The separate experiment workflow compares complete Vitest inventories on Node/Bun in alternating order, probes native Bun mocks, measures frozen-lockfile installation layouts, profiles actual Bun builds with/without transpiler caching, and tests browser worker counts. Warmup and CPU-profiled rounds are excluded from warm test timings. Experiments run on PR open/reopen or manual dispatch, not every push.
Baseline: https://github.com/microsoft/aspire.dev/actions/runs/41465710789 . Installs ~2s, build 298s, artifact upload 119s, slowest E2E shard 899s.
Measurements
First experimental run: https://github.com/microsoft/aspire.dev/actions/runs/41504904277 .
Second run: https://github.com/microsoft/aspire.dev/actions/runs/41506459350 .
Additional Windows compatibility probe: temporarily inlining Zod through Vite makes both Bun config re-import tests pass, but the complete Bun suite then fails the twoslash generator's
tsxsubprocess (preload not foundfor its loader file URL; 1,151 passed, 13 skipped, one failed suite). The temporary inlining change was removed. Replacing the test runtime is not yet a portable drop-in change.Production candidate CI: https://github.com/microsoft/aspire.dev/actions/runs/41506955689 passed: build, lint/unit validation, AppHost, publisher/PR comment, all six E2E shards, merged report, frontend gate, and CI gate. All assertions, viewport/shard coverage, timeouts, retries, and reporters remain intact.
The candidate's complete CI span was 24m28s versus the baseline's 26m09s. This is an observed comparison, not a controlled estimate of total speedup across different runner/cache conditions. The directly measured improvement is producer packing/upload: 10s instead of 119s. Consumer download plus extraction ranged 24-58s, so this does not promise faster transfer on every shard. The legacy HTML upload took 158s on its separate runner and no longer blocked browser startup.
Third-party links and affiliations
None. Reuses existing pinned actions and runner-provided tar/zstd; no new dependencies.
Validation
actionlint .github/workflows/frontend-build.yml .github/workflows/frontend-runtime-experiments.yml: passed.node node_modules/eslint/bin/eslint.js scripts/benchmark-test-runtimes.mjs config/build-timing.mjs tests/unit/build-performance.vitest.test.ts --max-warnings 0: passed, fromsrc/frontend.node --check src/frontend/scripts/benchmark-test-runtimes.mjs: passed.node node_modules/vitest/vitest.mjs run --config vitest.config.ts tests/unit/build-performance.vitest.test.ts tests/unit/astro-vite-config.vitest.test.ts: 11 passed, fromsrc/frontendafter restoring the unchanged runtime configuration.node scripts/benchmark-test-runtimes.mjs: Node controls passed on CI; Bun 1.4.3 and 1.4.4 candidates rejected on the two config failures. The native Bun probe also records the unsupported global-mock failures. Candidate failures are retained in artifacts rather than silently skipped; the four-worker experiment failed visibly.diff -qr dist extracted: passed in both CI experiment runs.bun run lint,bun run test:unit: passed in production-candidate CI.bun run build:production: passed on CI only.bun run playwright test --project=desktop-chromium --shard=1/2andbun run playwright test --project=desktop-chromium --shard=2/2: both passed on CI.bun run playwright test --project=tablet-chromium --shard=1/2andbun run playwright test --project=tablet-chromium --shard=2/2: both passed on CI.bun run playwright test --project=mobile-chromium --shard=1/2andbun run playwright test --project=mobile-chromium --shard=2/2: both passed on CI.bun run playwright merge-reports --reporter=html ./all-blob-reports: passed on CI.