Repository navigation
Conversation
Adds `tests/perf`, which bundles apps/tester-app in production mode (rspack and webpack, ios and android) for the current checkout and a base checkout, and compares the results: - output size (main bundle raw/gzip, all chunks, source maps, assets), module and chunk counts, and the list of emitted files; - build time (median of interleaved runs, each in a fresh process); - peak memory (process maxRSS plus the sampled process tree). Size metrics fail on a >1% increase. Time and memory use loose thresholds and only fail when head and base samples don't overlap. Metrics that vary between runs of one checkout (currently webpack output) are detected and compared like timings. Run locally with `pnpm bench --base-ref origin/main`. In CI, `.github/workflows/perf.yml` runs only on demand (the `perf` PR label or a manual dispatch) and is independent of the regular CI checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds two neutral apps that both Re.Pack and Metro build without changes: - apps/bench-expo: Expo Router app (Metro via Expo CLI, optionally with Expo's experimental tree shaking, vs Re.Pack with repack-expo); - apps/bench-bare: plain React Native app (Metro via the React Native CLI with @react-native/metro-config defaults, vs Re.Pack with the repack-init template config). `tests/perf/src/competitors.mjs` bundles each app at several sizes (screens added by `generate-screens.mjs`) and measures cold and warm release builds (wall time, CPU time, peak memory), bundle and Hermes bytecode size, and dev server startup and edit-to-bundle latency. It is not a regression gate: it is for comparing bundlers and finding performance wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@rjmreis is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
|
This branch has not been deployed
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.
Why
To iterate on Re.Pack safely (including with AI-assisted changes), we need to know when a change makes bundle size, build time or memory worse. Then we can use the same tooling to find performance wins.
What's in it
Two commits:
1. Regression check:
tests/perfBundles
apps/tester-appin production mode (rspack + webpack, iOS + Android) for the branch and its base, and compares them.CI:
.github/workflows/perf.ymlis on-demand only and independent of the regular CI checks. It runs when a PR gets theperflabel, or from the Actions tab (optionally with a PR number). It writes a report to the job summary and is not a required check. The existing workflows are untouched.2. Competitor benchmark:
tests/perf/src/competitors.mjsTwo neutral apps that both bundlers build unchanged:
apps/bench-expo(Expo Router)repack-expoapps/bench-bare(plain RN)@react-native/metro-configdefaults)repack-inittemplate configEach app is measured at several sizes (screens generated by
generate-screens.mjs). The benchmark covers cold and warm release builds (wall time, CPU, peak memory), bundle and Hermes bytecode size, and dev server startup and edit-to-bundle latency.Early findings (leads, to confirm)
Measured before rebasing onto RN 0.88 / Expo 58, on an M4 Pro, iOS only:
thread-loader+babel-swc-loader: the same RN files get different@babel/runtimehelpers depending on the worker.More detail and pitfalls are in
agent_context/perf-regressions-oct2026/design.md.Notes for review
pnpm-lock.yamlalso bumps@babel/types7.29.7 → 7.29.8 in 5 existing entries. pnpm does this on any workspace change (it happens even when adding onlytests/perf, which has no dependencies), so it isn't something these apps need.perf.ymlhasn't run on GitHub yet; adding theperflabel to this PR will be its first real run.🤖 Generated with Claude Code