Skip to content

Add benchmark script for site creation performance (STU-1235)#2467

Closed
ivan-ottinger wants to merge 4 commits intotrunkfrom
stu-1235-benchmark-site-create
Closed

Add benchmark script for site creation performance (STU-1235)#2467
ivan-ottinger wants to merge 4 commits intotrunkfrom
stu-1235-benchmark-site-create

Conversation

@ivan-ottinger
Copy link
Contributor

@ivan-ottinger ivan-ottinger commented Jan 23, 2026

Related issues

Related to STU-1235.

Summary

  • Adds a benchmark tool to compare Studio CLI site creation performance against raw Playground CLI
  • Supports both download mode (real-world) and bundled WordPress files (--use-bundled for apples-to-apples comparison)
  • Measures "create only" and "create + start" scenarios
  • Outputs min/max/avg/median statistics across configurable rounds

Note: Both CLIs are run with the system Node.js, not Electron's bundled Node. This ensures a fair CLI-to-CLI comparison.

Benchmark Results (5 rounds each)

Real-world Comparison

Playground downloads WordPress, Studio uses bundled files

Benchmark macOS ARM64 Windows ARM64
Playground CLI (download) 6.75s 15.57s
Studio CLI (create only) 6.24s (-7.5%) 13.56s (-12.9%)
Studio CLI (create + start) 7.11s (+5.3%) 13.86s (-11.0%)

Apples-to-Apples Comparison (--use-bundled)

Both use bundled WordPress files

Benchmark macOS ARM64 Windows ARM64
Playground CLI (bundled) 4.26s 9.20s
Studio CLI (create only) 5.91s (+1.65s / +38.8%) 12.15s (+2.95s / +32.1%)
Studio CLI (create + start) 7.01s (+2.75s / +64.6%) 15.12s (+5.92s / +64.3%)

Key Findings

  1. Windows is ~2.2x slower overall - baseline Playground performance, not Studio-specific
  2. Studio's percentage overhead is consistent across platforms - ~32-39% for create, ~64% for create+start
  3. Real-world users benefit from bundled files - Studio is faster than Playground (download) on both platforms
  4. Both layers contribute to total time - Playground is the larger component (4-9s), but Studio adds meaningful overhead (1.6-6s depending on operation/platform)

Usage

cd scripts/benchmark-site-create
npm install
npm run benchmark -- --rounds=5
npm run benchmark -- --rounds=5 --use-bundled  # apples-to-apples

Test plan

  • Run benchmark on macOS
  • Run benchmark on Windows
  • Document findings in STU-1235

@ivan-ottinger ivan-ottinger self-assigned this Jan 23, 2026
…ation

Introduces a benchmark tool to measure site creation performance:
- Compares raw Playground CLI against Studio CLI
- Supports both download mode and bundled WordPress files (--use-bundled)
- Measures "create only" and "create + start" scenarios
- Outputs min/max/avg/median across multiple rounds
- Saves results to JSON for cross-platform comparison

Usage: cd scripts/benchmark-site-create && npm install && npm run benchmark
- Use .cmd extension for Playground CLI on Windows
- Use taskkill instead of negative PID for process cleanup on Windows
- Use shell: true instead of detached: true on Windows for proper process handling
Windows paths contain colons (C:\...) which conflict with the
--mount-before-install=host:vfs format. Use --mount-dir-before-install
with separate arguments on Windows instead.
Calls `studio site delete --path=<siteDir>` after each Studio CLI benchmark
round to remove site entries from appdata, preventing orphan entries pointing
to deleted temp directories.
@ivan-ottinger ivan-ottinger force-pushed the stu-1235-benchmark-site-create branch from c4047db to 2d5876d Compare February 6, 2026 12:17
@ivan-ottinger
Copy link
Contributor Author

I have shared the summary of the tests in the related Linear task (STU-1235), will close this PR (and leave the branch in for now - in case we would like to run the tests again).

@wojtekn wojtekn deleted the stu-1235-benchmark-site-create branch February 20, 2026 08:44
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.

1 participant