You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d53e419
Browse filesBrowse the repository at this point in the historyBrowse files
feat: the baseline measured on the demo at fe2d9ed — sizes from builds whose build step runs offline, and cold starts
The release APK grows by 578 KB and the simulator app by 3.7 MB; the cold start grows by 76 ms on the emulator and by nothing measurable on the simulator.
The with variant keeps its build step, HOTCODEPUSH_OFFLINE set by the size script and the workflows, so no build asks the API.
The first-paint marker is logged at the error level, which an iOS release build keeps, and the first launch after the install is not counted.
The React Native demo passes the lifecycle contract on both platforms in the device test.
Closes#1
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: benchmarks/README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,30 +11,31 @@ What the package adds to an app, measured on the demo app and guarded from then
11
11
| Cold start added, Android | from the activity's start (`ActivityTaskManager: START` in logcat) to the first paint, on the Pixel_9_Pro emulator; the median of five cold launches with the package minus the median without |
12
12
| Cold start added, iOS | from the launch call to the first paint, on an iPhone simulator; the same medians |
13
13
14
-
The first paint is the `[baseline] first paint` line both variants log on their first animation frame, read from the JavaScript console: logcat on Android, the unified log on iOS.
14
+
The first paint is the `[baseline] first paint` line both variants log on their first animation frame, at the error level, since an iOS release build drops what the console logs below it; it is read from logcat on Android and from the unified log on iOS.
15
+
The first launch after the install is not counted, since the system verifies and compiles the app on it.
15
16
Both numbers come from release builds, since a debug build asks Metro for its JavaScript and the SDK stays off in it.
16
17
The "without" variant is the demo with the package and every line `init` wired removed — the build step in Xcode and Gradle, the bundle the two apps ask the SDK for, the pinned pod — and the screen swapped for the same screen with nothing behind it.
17
18
18
-
The sizes are measured with the build step unwired in the "with" variant too, `--no-binary-create`: the step needs a login, the resource file it writes weighs a few kilobytes against a binary of tens of megabytes, and the guard in CI holds no credential.
19
-
The cold starts are measured with the build step in place, against a stack the CLI is logged in to, since an app without its resource file starts no SDK.
19
+
The sizes are measured on builds whose build step runs offline, `HOTCODEPUSH_OFFLINE=1`, which the size script sets: `binarycreate` writes the resource file, creates no binary and asks no account, so the guard in CI holds no credential.
20
+
The cold starts are measured on builds made against a stack the CLI is logged in to, since a build without a channel checks for nothing at its start.
20
21
21
22
## Where the bytes sit
22
23
23
24
On the current baseline the Android release APK grows by about 578 KB.
24
-
About 310 KB of it is `libappmodules.so`, the Turbo Module's generated C++ once for each of the four ABIs the demo ships, of which an app bundle delivers one; about 270 KB is `classes2.dex`, the package's code and the shared core's, with OkHttp 5 and Okio in place of the OkHttp 4 React Native brings; the rest is the package's JavaScript in the bundle.
25
-
The simulator app grows by about 3.6 MB, nearly all of it in the `HotCodePushDemo` binary: the module and the core are linked statically, and a simulator build is a two-slice fat binary, so a device build carries about half of that; the rest is the core's privacy-manifest bundle and about 12 KB of JavaScript.
25
+
About 310 KB of it is `libappmodules.so`, the Turbo Module's generated C++ once for each of the four ABIs the demo ships, of which an app bundle delivers one; about 270 KB is `classes2.dex`, the package's code and the shared core's, with OkHttp 5 and Okio in place of the OkHttp 4 React Native brings; the rest is the package's JavaScript in the bundle and the resource file.
26
+
The simulator app grows by about 3.7 MB, nearly all of it in the `HotCodePushDemo` binary: the module and the core are linked statically, and a simulator build is a two-slice fat binary, so a device build carries about half of that; the rest is the core's privacy-manifest bundle, about 12 KB of JavaScript and the resource file.
26
27
27
28
## Running it
28
29
29
30
```sh
30
31
npm run build && npm pack --pack-destination /tmp
31
-
node benchmarks/prepare-demo.mjs ../react-native-code-push-demo /tmp/baseline/with with /tmp/hotcodepush-react-native-code-push-0.0.0.tgz --no-binary-create
32
+
node benchmarks/prepare-demo.mjs ../react-native-code-push-demo /tmp/baseline/with with /tmp/hotcodepush-react-native-code-push-0.0.0.tgz
32
33
node benchmarks/prepare-demo.mjs ../react-native-code-push-demo /tmp/baseline/without without
For the cold starts, prepare the "with" variant again without `--no-binary-create`, with `HOTCODEPUSH_TOKEN` set and `hotcodepush.json`naming an app of that account, then:
38
+
For the cold starts, set `HOTCODEPUSH_TOKEN` and let the "with" variant's `hotcodepush.json`name an app of that account, then:
0 commit comments