Skip to content

Measure spec timings and share browsers in blueprint specs #262

Closed

Description

@woksin

Scene's spec time is not measured anywhere today. Neither .NET Build nor JavaScript Build has run on main (both are triggered by PRs or manually), and no job keeps per-project or per-class timings. Speed work therefore has no baseline.

What looks expensive (unverified)

  • .github/workflows/javascript-build.yml:90-108 runs 17 browser workspace spec commands one after another.
  • The blueprint fixtures cache bundling but launch Chromium per fixture, for example Source/JavaScript/blueprint.administration/for_administrationApplication/given/a_administration_page.ts:58,92.
  • .NET: Engine.Specs and Model.Specs. No host-per-class or Docker-per-class pattern was found.

Proposed work

  1. Record timings: emit trx/junit reports from both workflows, upload them as artifacts, and add a one-line per-project summary to the job summary.
  2. Measure the browser specs locally per workspace. Where Chromium startup dominates, share one browser per worker and give each fixture its own context.
  3. Then run the browser workspaces as a bounded matrix (for example 3 shards) instead of serially.

Status

State: Done — Merged in #271; closed as completed.
Branch: arc-3152-system-execution-identity
Scope: L44: record spec timings in CI, then share browsers per worker in the blueprint browser specs. Delivered to the Scene owner (L32).
Plan: Opt-in JUnit/TRX reports uploaded with 3-day retention, plus a per-project job summary. Browser specs run as a 3-shard matrix. One shared Chromium server only in primereact and blueprint.default, where fixtures launch Chromium many times; it stays only if it saves time. The 300 ms settle wait dominates blueprint app specs and is left as a follow-up.
Delivered: - #271
Remaining: To be confirmed.
Follow-ups: None.

Activity

  1. woksin commented on Oct 23, 2026

    @woksin
    ContributorAuthor

    Frontend timing baseline (origin/main c49522c, macOS dev machine, cold worktree, wall time excludes queueing):

    Step Wall
    yarn build (cold / warm) 44 s / 32 s
    yarn lint 39 s
    yarn test (25 workspaces, jsdom/node) 198 s
    blueprint verification 9.5 s
    Storybook build 19 s

    yarn test: vitest itself reports 167 s summed over 25 workspaces. run-task-on-workspaces.js runs yarn test per workspace serially (spawnSync), so the total is the sum. Largest: blueprint.default 26.6 s, blueprint.crm 14.5 s, primereact 12.5 s, blueprint.customer-portal 11.9 s, then a long tail of 4–8 s runs where transform/import is often more than half.

    Browser specs (test:browser, Chromium via Playwright):

    Workspace Tests Vitest duration
    blueprint.crm 152 56.4 s (98% in tests)
    blueprint.default 1373 36.1 s
    blueprint.administration 44 22.1 s
    primereact 104 21.9 s

    Cheapest wins, in order:

    1. Run the workspaces in parallel (or as one root vitest projects run) instead of serial spawnSync. This alone should move yarn test from about 198 s toward the largest single workspace.
    2. blueprint.crm browser specs: 152 tests take 56 s, about 370 ms per test against about 26 ms in blueprint.default. Look for per-test page/browser setup or real waits; sharing the browser per file is the scope of this issue.
    3. Share one vitest config/transform cache across blueprint workspaces to cut the repeated transform cost in the 4–8 s tail.
  2. self-assigned this
    on Oct 24, 2026
  3. woksin commented on Oct 25, 2026

    @woksin
    ContributorAuthor

    Delivered in #271 (merged). The spec runs now report per-package timings, and the browser specs run in balanced shards. Sharing one Chromium instance across packages was measured and not kept, because it did not give a meaningful gain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions