Skip to content

perf: reduce Apple runner build overhead#898

Merged
thymikee merged 1 commit into
mainfrom
perf/apple-runner-build-time
Jun 27, 2026
Merged

perf: reduce Apple runner build overhead#898
thymikee merged 1 commit into
mainfrom
perf/apple-runner-build-time

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Reduce cold Apple runner build overhead by replacing the SwiftUI host app with a minimal native Objective-C host app and disabling unneeded Xcode build products for runner builds.

Platform / destination Variant 5 cold wall runs (s) Avg wall Avg SwiftCompile Swift tasks Swift archs Delta
iOS simulator / concrete iPhone 17 Pro baseline 9.34, 8.25, 7.77, 8.51, 8.26 8.42s 12.311s 15 arm64 -
iOS simulator / concrete iPhone 17 Pro optimized 6.75, 6.56, 6.49, 6.56, 5.89 6.45s 8.765s 12 arm64 23.4% faster
macOS / arm64 baseline 14.93, 11.01, 9.86, 10.20, 9.98 11.20s 10.919s 15 arm64 -
macOS / arm64 optimized 7.84, 8.30, 8.22, 7.90, 7.89 8.03s 9.789s 12 arm64 28.3% faster

Details:

  • Removed SwiftUI from the host app target, which drops the app-target Swift files and generated Swift asset symbol work.
  • Added runner build settings for active arch, no previews, and no debug dylib alongside the existing no-index/no-coverage settings.
  • Fixed the tvOS build by keeping the keyboard return tap/typeText helper iOS-only.
  • Confirmed concrete simulator build-for-testing is already arm64-only on Xcode 26.2, so the expected universal-to-active-arch 2x win is not available on the runtime prepare/snapshot path. Generic iOS/tvOS script builds remain universal because they use device-free generic simulator destinations.

Touched files: 9. Scope stayed within Apple runner build/project code and its existing unit coverage.

Validation

Verified with timeout-wrapped commands to avoid stuck build/check processes:

  • Direct formatter on touched JS/TS files: passed.
  • ./node_modules/.bin/vitest run src/platforms/ios/__tests__/runner-client.test.ts: 57 tests passed.
  • ./node_modules/.bin/oxlint . --deny-warnings: passed.
  • ./node_modules/.bin/tsc -p tsconfig.json: passed.
  • AGENT_DEVICE_XCUITEST_PLATFORM=macos sh ./scripts/build-xcuitest-apple.sh: passed.
  • AGENT_DEVICE_XCUITEST_PLATFORM=ios sh ./scripts/build-xcuitest-apple.sh: passed.
  • AGENT_DEVICE_XCUITEST_PLATFORM=tvos sh ./scripts/build-xcuitest-apple.sh: passed.

Notes: pnpm format, pnpm exec vitest ..., and pnpm check:quick hung before spawning their underlying tools in this environment, so I interrupted those wrapper processes and ran the local binaries directly with timeouts.

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.4 MB 1.4 MB +68 B
JS gzip 445.2 kB 445.2 kB +44 B
npm tarball 583.3 kB 584.0 kB +685 B
npm unpacked 2.0 MB 2.0 MB +2.5 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.1 ms 28.9 ms +0.9 ms
CLI --help 48.7 ms 50.0 ms +1.3 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/9722.js +68 B +44 B

@thymikee thymikee merged commit 5a67623 into main Jun 27, 2026
20 checks passed
@thymikee thymikee deleted the perf/apple-runner-build-time branch June 27, 2026 11:48
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-27 11:48 UTC

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