Skip to content

perf(build): reuse native configurations and shared SDK inputs - #297

Draft
f0rr0 wants to merge 12 commits into
f0rr0/native-bazel-releasefrom
f0rr0/macos-bazel-performance
Draft

f0rr0 wants to merge 12 commits into
f0rr0/native-bazel-releasefrom
f0rr0/macos-bazel-performance

Conversation

@f0rr0

@f0rr0 f0rr0 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Apple packaging rebuilt extension objects in different raw/framework configurations and repeatedly recreated SDK sandbox inputs. Android release carriers and APKs also rebuilt the same native libraries under different configurations. Share the maintained Apple/Android transitions, keep released native API floors independent of app Java/Dex floors, and reuse the complete declared SDK inputs with stock Bazel sandbox/Merkle caching.

The regressions compare actual object/archive Files derived from carrier metadata. Apple requires every profile in both raw and framework branches; Android checks both declared ABIs at the app minimum SDK and a higher SDK. The runtime and extension shipping owners now require the Apple checks, and Android shipping requires its reuse check. No object-file lists are maintained.

Capture ranks shared paths once per graph, sorts compact numeric ranks, and hashes the same complete sorted path strings. It preserves the full input projection. Full qualifications retain stock compact execution logs. This integrates the migration's traversal, cache-retention and physical/publication-mode fixes. The migration's pg_textsearch upgrade also exposed a drifted compiler-runtime member list; the constructor and final validator now share the canonical license policy, retaining strict paths, modes and hashes.

Observed hosted results at f4fee98, against e1b5e65:

Measurement Before After Reduction
Complete Linux x64 job 145m33s 112m47s 22.5%
Complete Android package/device phase 98m31s 70m17s 28.7%
Android planned C/C++ actions 30,361 14,018 53.8%

The Linux job passed. All 11 Android tests executed and passed, including reuse and the installed APK on an API 35 x86_64 emulator. Its source-bound receipt proves all 39 extensions, ICU and lifecycle resume. Artifact 12197041283 has SHA-256 b298b12db965f745c38db8fbcc940c5c5b6abe0ff89c7dadcd9bd87bb22099fb. The later cancelled workflow does not invalidate this completed job, but does not establish a full Native Required gate.

Other validation:

  • 215 focused unit tests and 22 source/workflow checks passed before migration-base integration. Linux CI at integrated 9bc16c1 passed all 977 controller tests. The final shared-license fix passes all 22 legal-inventory tests, extension-model validation and the metadata check.
  • Both Apple regression checks execute in 1.5 seconds locally; an actual configured export comparison proves they were absent before the owner-policy wiring and required afterward. Local Mac validation uses an isolated source copy and installed Xcode 26.4.1; shipping remains pinned to 26.5.
  • Apple planned compilations fall from 23,017 to 16,463. A controlled 192-compilation benchmark falls from 417.8 to 45.2 seconds with byte-identical archives; this isolates SDK setup overhead.
  • Full local Android construction passes. Applying the final f4 source and genuine public-input snapshot then reuses 25,277 actions in 67.7 seconds with zero compiler/linker/package spawns. This is output-base reuse, not a cold benchmark.
  • A representative real Apple projection falls from 36.5 to 16.5 seconds with its full serialized hash unchanged. Unicode ordering, aliases, large IDs and unrelated graph paths are covered.
  • A real Android closure restores all 193 actions in a fresh output base; deliberate stock collection then reruns 190 with identical complete input digests, commands and environments. Actual Linux CI had collected 3.7/5.7 GiB and 122,844/135,259 files under the former 2 GiB budget.

Mac end-to-end performance remains open. Its measured cold build/tests took 4h45m with zero disk hits on the three-CPU/7 GiB runner. The successfully saved Mac snapshot disappeared before the next restore while total repository caches were near 10 GiB. Six completed snapshots belonging only to superseded #301 were removed to free 3.96 GB; repository-wide retention remains a capacity issue. The user confirms there is no existing shared remote cache. GitHub rejects its cache-capacity endpoint with HTTP 402 until a valid payment method is configured; no billing or capacity setting has changed. No custom cache service, larger paid runner, global Starlark flag reset, removed check or shipping tool pin change is introduced. A remaining host-tool split differs only by Android's minimum-SDK flag; pinned Bazel's global reset also affects Rust/Apple settings, so it is not enabled blindly.

Pushed integration head: 45c3e44, including migration base 5d952f2. Native CI 39284507404 is still running and has not passed Required. The shared-license fix cleared the earlier Linux final-contract failure. Portable Linux x64 now fails on one unformatted Rust assertion imported from main; local commit 8614616b fixes it and the pinned formatter passes all 219 sources from the exact Bazel source query. That commit is held locally to preserve the active Mac timing run. Full local Bazel formatter-test analysis requires the absent shipping Xcode 26.5 SDK. The ARM postmaster handoff also rejected a producer that GitHub reports successful; the unchanged canonical authenticated downloader succeeds later for the same exact source, tree, run, producer and artifact. A transient metadata delay is suspected, but the failed snapshot was not retained, so the cause is not proven. The measured f4 results are not final-head release admission. #301 is closed as superseded.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
oliphaunt-docs Ready Ready Preview Oct 19, 2026 4:20pm UTC

@f0rr0 f0rr0 changed the title perf(build): reuse Apple SDK sandbox inputs perf(build): reuse Apple SDK inputs and extension compilations Oct 19, 2026
@f0rr0 f0rr0 changed the title perf(build): reuse Apple SDK inputs and extension compilations perf(build): reuse native configurations and shared SDK inputs Oct 19, 2026

This branch was successfully deployed

1 active deployment
Preview — 45c3e448 Deployed Oct 19, 2026 by vercel[bot]
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