BakeNative is under active development. APIs may change.
Skip to Content
BakeNative

Performance

Measured launch, size, update and development-loop numbers, each with the conditions it was measured under, and what is not measured yet.

This page lists what has been measured, under which conditions, and what has not.

How to read it:

  • Every number has its conditions next to it: device or simulator, build, number of runs, statistic, and machine load.
  • Simulator and Mac numbers are not phone numbers. Compare a number only with numbers measured the same way.
  • Not measured means nobody has measured it. It does not mean slow or fast.
  • Raw data lives in the repository where it is committed. The sources are linked in each section.

Frame rate

BakeNative draws at the display's refresh rate by default: 120 Hz on ProMotion iPhones and iPads, the panel's rate on high refresh rate Android phones, and the monitor's refresh rate on macOS and Windows. On iPhone the app's Info.plist needs CADisableMinimumFrameDurationOnPhone, which bake create adds; an existing app adds it itself (Embed in an iOS app).

Launch

The first screen does not depend on bundle size

The first screen is drawn from the baked snapshot on the main thread. Hermes loads and runs app.hbc on its own thread, and the main thread does not wait for it.

app.hbcRoot launch → first screen drawn (median)
0.5 MB21.0 ms
4.8 MB20.0 ms

Conditions: iOS simulator, Release build of a shop demo app, the same first screen in both builds, 7 launches each, 1-minute load 5–20.

The bundle-size work does exist, off the main thread: Hermes load and evaluation took 4.4 ms for the small bundle and 21–26 ms for the large one.

Process start → first screen

From the performance gate (pnpm perf:gate, method in tools/perf/README.md), Starter app (examples/app), Release, 30 cold launches per host, a fresh process each, three runs, median of the run medians:

HostFirst screenFirst displayAdoption doneViews created on adopt
iOS simulator1736 ms1893 ms1770 ms0
macOS (Apple M4)154 ms162 ms162 ms0

Conditions: Apple M4, 15-minute load 14–19, simulator already booted. The iOS numbers include the simulator's own process launch on a shared Mac. Compare them only with each other.

Android phone: process start → first frame

The Starter app (examples/app) in the examples/android host, release APK (R8, arm64), on a phone. Each launch starts from a stopped process (am force-stop); the first launch after install is not counted.

MeasureMedianp90
Process start → first frame (am start -W TotalTime)511 ms544 ms
View load → first frame278 ms317 ms
View load → adoption done (Hermes ran, 0 views created)321 ms345 ms

Conditions: Samsung SM-A185N, Android 17 (API 37), 1080×2340, 90 Hz, 10 launches, tests/e2e/android-device-perf/run.mjs coldstart. TotalTime is the system's own launch time: the intent to the activity's first frame drawn.

Embedding in an existing app

One BakeNative screen pushed in an existing UIKit app, next to the same screen written in UIKit and SwiftUI. First push after launch, a fresh process per sample:

ScreenFirst frame (median)
BakeNative100.8 ms
UIKit113.3 ms
SwiftUI139.7 ms

Conditions: iOS simulator, Release, N = 30 each, median, 1-minute load below 30 at every sample. Adoption created 0 views in all 210 adopted samples.

Size added to the app (Release, arm64): +7.48 MB for the iOS .app (+3.27 MB as a zip), +8.28 MB for macOS. Of that, the Hermes framework is 3.62 MB on iOS.

The full tables (repeat push, macOS, memory, binary size), the method and the raw data are on Embedding cost.

Size

The performance gate checks these sizes in pnpm check. A build fails when a size goes over its budget. Budget = recorded value + 3 %. 1 MB = 1024 KB.

WhatRecordedBudget
Starter app.hbc (bytecode)345 KB356 KB
Starter app.baked (snapshot)49 KB51 KB
Starter web entry, Brotli q1150 KB52 KB
iOS static library, arm64, stripped3.01 MB3.11 MB
iOS demo executable, arm64, stripped3.57 MB3.68 MB
Android libbakenative.so, arm642.25 MB2.31 MB
Android demo APK, release9.57 MB9.86 MB
Windows .exe and .zipNot gated–

The values and per-run data are in tools/perf/budgets.json.

Updates after launch

When your app changes state, its renderer sends a batch of changes to the element tree. BakeNative does only the work that batch requires.

StageWhat runs
StyleOnly the elements whose props changed (and their subtrees) are styled again. Siblings are restyled only when a stylesheet has rules that depend on them (+, ~, :nth-child).
LayoutLayout nodes persist between updates. A change marks its node and ancestors dirty; clean subtrees keep their layout and measurement caches.
ViewsOnly the views of restyled, moved or re-parented elements are touched; reordering moves only the views that are out of place.
DrawingBackgrounds, borders, corner radii and linear-gradients are Core Animation layer properties drawn by the GPU, with no bitmap. Only text and SVG are drawn into bitmaps.
Motiontransitions and @keyframes of opacity, transform and background-color run in Core Animation. No JavaScript runs per frame.

The built-in View and Text have two more targeted paths. When a View's only change is its inline opacity, the core does not restyle it and the host changes only the view's opacity. On iOS, when only the content of a Text changes, the host can replace its text runs without a full view update. Use built-in views first lists the conditions.

Conditions for the tables below: Apple M4, macOS 27, in-process (bake-bench), milliseconds per update. These are engine numbers on a Mac, not device frame timings. "Native work" is the core's style, layout and view work. It does not include the host applying the result on the main thread, which One update, stage by stage measures as stage ⑥.

1,000 rows, no virtualization (examples/bench, about 5,000 elements), native work (style + layout + views):

UpdateBeforeNow
One text changes4112
One row's class toggles3656
A keyed row moves4229

The showcase (5,000 coins in a virtual list), total per step including JavaScript:

Scenariop50p95
Live tick: 40 coins change3.03.3
Scroll at 24,000 pt/s4.39.3

The measurements below use the Octane adapter. JavaScript is the larger share of small updates: Octane re-renders a component's whole output, so state at the top of a 1,000-row list costs about 1.2 µs per row in Hermes on the macOS host (the table below: 1.36 ms with the state above the list, 0.14 ms with it in its own component). Keep state close to where it is shown, and use a virtual list for long lists.

One update, stage by stage

Where one screen update spends its time, from the input to the host applying the result:

  1. JS: the event handler runs and Octane renders and diffs.
  2. The batch of changes is encoded (OCB2) in JS and decoded by the core in the same JSI call.
  3. The core puts the batch into its element tree and restyles what changed.
  4. Layout, line breaking and text measurement.
  5. View specs, the semantic tree and the op buffer for the host.
  6. The host applies the op buffer on the main thread.

Milliseconds per update, as p50 / p95 (fastest run's p50). First as measured before the fixes below (commit 543a537c, 2026-11-28):

StageText, state at the topText, state in a leafClass toggleLive tickScroll stepTransform animation
① JS: handler, Octane render, diff2.97 / 3.96 (2.70)0.15 / 0.18 (0.09)2.86 / 3.70 (1.66)2.39 / 3.17 (1.12)1.78 / 2.41 (0.76)0.63 / 0.99 (0.56)
① and ②: JS entry, macOS host1.36 / 1.58 (1.29)0.14 / 0.16 (0.13)1.42 / 6.37 (1.34)–1.19 / 2.36 (1.13)–
② OCB2 encode (JS)0.02 / 0.03 (0.02)0.02 / 0.03 (0.01)0.02 / 0.03 (0.01)0.03 / 0.08 (0.01)0.17 / 0.23 (0.08)0.05 / 0.06 (0.04)
② OCB2 decode (core)< 0.01< 0.01< 0.01< 0.010.02 / 0.03 (0.01)< 0.01
③ into the tree, restyle0.01 / 0.02 (0.01)0.01 / 0.02 (0.01)0.06 / 0.08 (0.02)0.02 / 0.17 (0.01)0.36 / 0.46 (0.14)0.06 / 0.08 (0.06)
④ layout, fixed-width text0.24 / 0.70 (0.13)0.24 / 0.33 (0.11)0.18 / 0.27 (0.06)0.09 / 0.21 (0.03)0.34 / 0.47 (0.11)0.18 / 0.29 (0.16)
④ layout, CoreText (macOS host)0.26 / 0.46 (0.25)0.26 / 0.30 (0.22)0.08 / 0.44 (0.07)–0.54 / 0.71 (0.48)–
⑤ views, semantic tree, ops1.09 / 1.61 (0.50)1.18 / 1.54 (0.40)0.98 / 1.45 (0.29)0.18 / 0.32 (0.07)0.60 / 0.82 (0.19)1.14 / 1.66 (0.88)
⑥ macOS main thread applies the ops8.14 / 8.76 (7.98)7.75 / 8.10 (7.34)0.36 / 1.36 (0.34)1.91 / 2.54 (1.83)3.61 / 5.88 (3.26)0.18 / 0.60 (0.17)
① to ⑤: input → op buffer4.66 / 6.95 (4.23)1.80 / 3.22 (0.76)4.35 / 6.11 (2.11)3.00 / 5.58 (1.35)3.53 / 4.73 (1.38)2.28 / 3.41 (1.87)

The scenarios:

  • Text, state at the top / in a leaf: one counter text on a page with a 1,000-row list (tests/perf-update). At the top, the counter's state lives in the component that also renders the list. In a leaf, it lives in a component of its own.
  • Class toggle: one row of the 1,000 toggles its class (state above the list).
  • Live tick: the showcase's 100 ms tick, 40 coins change.
  • Scroll step: one 200 pt scroll of the showcase's 5,000-coin virtual list.
  • Transform animation: one requestAnimationFrame frame that moves 24 elements by transform alone, on the same 1,000-row page.

What these numbers showed:

  • ⑥ was the largest stage when a text changes: about 8 ms on the macOS main thread for one text. The host rebuilds its whole accessibility element tree after every buffer that changes the semantic tree, and finding each element's view scans every node. In a profile of the leaf case, that rebuild took most of the main-thread time. A class toggle leaves the semantic tree as it was and costs 0.36 ms.
  • ① is the largest JS stage when state sits above a long list. Moving the same state into its own component takes the JS entry from 1.36 ms to 0.14 ms on the macOS host.
  • The in-process benchmark's JS is slower than the host's. For the same steps, the in-process ① is about twice the host's JS entry (2.97 ms against 1.36 ms at the top), while the leaf case agrees (0.15 ms against 0.14 ms). Compare ① only within one row.
  • ⑤ cost up to 1 ms on the 1,000-row page even for one text or one transform. View specs, the semantic tree and op generation together took about 0.05 ms of it. Timed separately, most of the rest was the hit test's views, rebuilt from every view after each commit.
  • ② and ③ stay small: the batch encoding and decoding are 0.2 ms or less, even for a scroll step.

How it was measured:

  • Machine: Apple M4 (10 cores), macOS 27, commit 543a537c, 2026-11-28.
  • Runs: each scenario ran 7 times, each run a fresh process with 40 timed steps after 5 warm-up steps, so 280 samples per cell. The scenarios ran interleaved.
  • Load: the 1-minute load average was 6–12 during the runs and is recorded before and after every run; a run that ends at 40 or more is thrown away and run again (none were). Other work shared the machine, which is why the fastest run's p50 is listed: it is the closest to an idle machine.
  • Stages ① to ⑤ were measured with bake-perf phases: real Hermes, the baked bundle and the core in one process, with a fixed-width text backend and a driven clock. ① is timed inside JS with Hermes' wall clock, in a bundle built with BAKE_PHASE_TIMINGS=1; normal builds leave that code out. The core stages come from its own counters, which are compiled only into benchmark builds.
  • Stage ⑥, the host's JS entry and the CoreText layout row come from bake-mac-phases, a separate process running the real macOS host (BakeNativeView in an offscreen window) on the same scenarios. ⑥ is the main-thread time spent applying the op buffers that answered the step; it ends before Core Animation commits the frame.
  • Spread: in the in-process rows, the run medians of one scenario differ by up to 2–3× (live tick ① 1.12–2.65 ms) at a 1-minute load of 6–12. ⑥ stays within 10 %. A before/after comparison has to interleave the two builds.
  • Not shown: ⑥ on iOS, Android and Windows. The iOS host rebuilds its accessibility elements the same way and is likely to show the same cost there.

Raw samples: tools/perf/phases/2026-11-28-543a537c.json. Method and commands: tools/perf/README.md, "One update, stage by stage".

After the fixes

Two stages were changed:

  • ⑥, the accessibility tree. Each view's owner node is now looked up in an index. A rebuild leaves an element alone when its node, its label and what its values read are unchanged. On iOS and macOS the elements are built only once an AX client asks for them: VoiceOver, Accessibility Inspector, XCUITest or agent-device. From then on they are rebuilt after every update, as before.
  • ⑤, the hit test's views. They are built on the first hit test after a commit instead of at every commit, so an animation frame, a live tick or a scroll step with no input before the next commit skips them.

⑥ on the macOS host, each build run in turn, five rounds of 40 steps, as p50 / p95 (fastest round's p50):

UpdateBeforeAfter, no AX clientAfter, an AX client attached
Text, state at the top8.04 / 10.80 (7.57)0.82 / 1.86 (0.70)2.03 / 3.35 (1.98)
Text, state in a leaf7.60 / 8.31 (7.32)0.39 / 0.67 (0.35)1.65 / 3.20 (1.52)
Class toggle0.36 / 0.68 (0.31)0.34 / 0.61 (0.28)0.35 / 0.64 (0.30)
Live tick1.98 / 4.50 (1.92)0.90 / 1.67 (0.84)1.17 / 3.39 (1.06)

"An AX client attached" is the rebuild that leaves unchanged elements alone, with the index. It is the cost while VoiceOver runs.

⑤ in process, the two builds run in turn, five rounds of 40 steps:

Update⑤ before⑤ after
Text, state in a leaf0.46 / 1.65 (0.34)0.13 / 0.36 (0.10)
Class toggle0.42 / 1.63 (0.38)0.10 / 0.42 (0.09)
Transform animation0.49 / 1.85 (0.37)0.15 / 0.55 (0.08)
Live tick0.11 / 0.25 (0.08)0.07 / 0.19 (0.04)
Scroll step0.31 / 0.81 (0.25)0.29 / 0.66 (0.20)

The hit test that follows a click (event) did not grow: 0.01 ms in both.

①–⑤ after the fixes, in process (2026-11-29, five runs of 40 steps, 1-minute load 4–24):

StageText, state at the topText, state in a leafClass toggleLive tickScroll stepTransform animation
① JS: handler, Octane render, diff2.51 / 3.71 (2.08)0.15 / 0.30 (0.07)2.60 / 3.89 (2.47)2.47 / 3.39 (1.44)1.61 / 2.39 (1.16)0.85 / 1.48 (0.28)
② OCB2 encode (JS)0.01 / 0.03 (0.01)0.02 / 0.04 (0.01)0.01 / 0.02 (0.01)0.02 / 0.08 (0.02)0.17 / 0.23 (0.11)0.07 / 0.12 (0.02)
③ into the tree, restyle< 0.010.01 / 0.02 (< 0.01)0.02 / 0.06 (0.02)0.01 / 0.17 (< 0.01)0.28 / 0.51 (0.20)0.08 / 0.13 (0.02)
④ layout, fixed-width text0.11 / 0.57 (0.10)0.24 / 0.59 (0.08)0.09 / 0.19 (0.09)0.06 / 0.19 (0.04)0.23 / 0.45 (0.16)0.23 / 0.50 (0.05)
⑤ views, semantic tree, ops0.11 / 0.22 (0.10)0.23 / 0.44 (0.07)0.11 / 0.18 (0.11)0.07 / 0.18 (0.05)0.34 / 0.54 (0.24)0.35 / 0.57 (0.09)
① to ⑤: input → op buffer3.04 / 4.74 (2.46)1.11 / 2.39 (0.36)3.06 / 4.51 (2.92)2.91 / 4.13 (1.70)2.82 / 4.23 (2.01)2.08 / 3.39 (0.59)

Now ① is the largest stage of an update whose state sits above a long list, and of the live tick. In the same session the macOS host processes ran about 1.5× slower than on 2026-11-28, the build from before the fixes included (its leaf ⑥ p50 11.9 ms, fastest round 7.6 ms), so the host's own rows are compared only in the interleaved table above.

Raw samples: tools/perf/phases/2026-11-29-d367f399.json (①–⑤ and the host rows of that run), tools/perf/phases/ab-accessibility-2026-11-29.json (⑥), tools/perf/phases/ab-hit-views-2026-11-29.json (⑤).

1,000 rows on an Android phone (examples/bench-scroll, about 3,000 views): flings to the end of the list and back, frame times from dumpsys gfxinfo, the median of 3 rounds. The control is the phone's own Settings list of all apps (a RecyclerView), scrolled the same way:

ListLate framesp50p90p99
Plain list, no virtualization5.7 %15 ms21 ms30 ms
Plain list, before off-screen rows were culled39.5 %34 ms40 ms46 ms
VirtualList1.0 %19 ms23 ms26 ms
Control: Settings, all apps20.2 %32 ms46 ms48 ms

Where a frame's time went (dumpsys gfxinfo framestats, median per frame):

PhasePlain, beforePlain, nowVirtualList
UI thread: input, animation, layout1.4 ms1.1 ms1.2 ms
UI thread: recording display lists0.4 ms0.3 ms1.2 ms
RenderThread: issuing draw commands11.9 ms5.6 ms5.8 ms
GPU8.6 ms6.0 ms6.3 ms

Scrolling never recorded the rows again (0.4 ms on the UI thread). The time was the RenderThread walking all 3,000 render nodes on every frame: HWUI skips an off-screen node only when it clips to its bounds, and node views never clip (a child's shadow or overflow draws outside it, as in CSS). A box with 48 or more children now records only the children whose ink can reach the screen or one screen around it, and records again when the screen leaves that window.

Conditions: Samsung SM-A185N, Android 17 (API 37), 1080×2340 at 90 Hz (11.1 ms per frame), release APK (R8, arm64), 3 rounds of 15 flings down and 15 up, tests/e2e/android-device-perf/run.mjs scroll (--control for Settings; VITE_BENCH_LIST=virtual builds the VirtualList variant).

Long lists

VirtualList with 10,000 rows on the Windows host's view tree:

MeasureResult
Blank rows seen0
JS commit (core layout + ops + tree apply)mean 0.48 ms, p99 0.63 ms
Views180 (the same at 10,000 and 100,000 rows)

Conditions: VirtualList v0.1, a test that drives the host tree without a window, 48 px rows, 800×900 viewport, a fling at ±24,000 pt/s to the end and back, at 120 Hz (JS answering 1, 2 or 8 frames late, or not at all) and at 60 Hz. Real wheel input in a real window was not measured.

Development loop

bake dev rebuilds and reloads the app on every saved change. Time from save to the new screen, Windows PC, a copy of examples/app, 10 saves, p50:

Target.tsrx change.css change
Web (headless Chrome)0.86 s1.1 s
Windows (host restarted)1.3 s1.3 s

Most of it is the full Vite rebuild (about 0.75–1.0 s). One web run under other load had a p50 of 3.0 s. On iOS, macOS and Android, bake dev also relaunches the app after each build (CLI); that reload is not measured here.

Timers and the live tick

The showcase's live tick (setInterval every 100 ms, 40 coins change) on a live clock, from the core's own counters (bake inspect timing, tests/e2e/clock/tick-report.mjs): how late each tick runs against its scheduled time, how many commits share a display frame, and how many hand-offs between the JS thread and main one tick takes. 10 s, 100 ticks per run, debug apps on an M-series Mac at a 1-minute load of 5 to 6:

HostTimer lateness mean / p50 / maxCommits per frame (max)Core → main per tickCore wake-ups per tick
macOS (3 runs)1.73–1.88 / 2.01 / 2.07 ms1.00 (1)1.002.18–2.30
iOS simulator (2 runs)1.60–1.66 / 2.01 / 2.04 ms1.00 (1)1.002.25–2.90
Windows (earlier measurement, timeBeginPeriod(1))0.8 ms mean (8.4 ms before it)

Every tick is one commit in its own frame and one hand-off to main. The lateness is nearly constant (p50 and p90 both 2.0 ms), so it is a fixed offset rather than wake-up jitter; it has not been tracked down yet.

Not measured yet

  • Cold start on a real iPhone, next to Exact with the same probe.
  • Exact's list benchmark spec (fps, late frames, idle CPU, peak memory) on a real device.
  • Embedding cost on a real iPhone.
  • Launch times on Windows.
  • Idle CPU and peak memory while scrolling on an Android phone.
  • Memory with the JavaScript heap included.
  • Windows .exe and .zip size budgets.

Correctness

Incremental work is only useful if it gives the same result as doing everything again. pnpm check verifies it on every change:

  • After each update (random clicks, scrolling, live ticks, and a second document laying out the same tree), every element's style, role, frame and text must equal a full restyle and layout from scratch, and the views must match a full sync.
  • The layer-backed views must render the same pixels as the reference painter.
  • The real BakeNativeRoot scrolls the showcase and its virtual list must cover the viewport.

Supported CSS

Native targets render what the engine computes, and bake build fails on anything it would drop, with the file and line: unknown properties, values that don't parse, selectors that can never match, unsupported at-rules. Motion is limited to what Core Animation runs (opacity, transform, background-color). Wrap web-only CSS in

@supports not (-bake-native: true) {
  .card:hover { box-shadow: 0 8px 24px rgb(0 0 0 / 0.2); }
}

Browsers apply it as usual; native builds skip it.

See also: Comparison.

On this page