The Wire · Showcase
REACT COMPILER CUTS JSON SERIALIZATION OVERHEAD, NATIVE TEAMS CLEAN DEAD CODE
By RepoJournal · Filed · About Meta
The Rust compiler is ditching wasteful serialize-deserialize round-trips by passing typed ASTs directly to consumers instead of converting everything to JSON and back.
React's compiler pipeline just eliminated a performance tax that hit every compile [1][2]. The `compile_program` function used to serialize the transformed AST to JSON, then every in-process caller immediately deserialized it back, burning CPU on a round-trip nobody needed. Now `CompileResult::Success.ast` returns the typed AST directly; only the napi bridge serializes at the edge where it matters [1]. The oxc and swc frontends skip the penalty entirely and consume the typed AST straight from compilation. This stacks on top of yesterday's patch to carry unmodeled AST subtrees (type annotations, class bodies, unknown statements) as raw JSON without allocating individual nodes [3][4], cutting allocation pressure on pass-through subtrees that nobody inspects anyway. Over in React Native, the teams landed a cleanup blitz: `JSIndexedRAMBundle` [5], a deprecated legacy-architecture class with zero callers, is gone from cxxreact; `telemetryTimePointToSecondsSinceEpoch()` [6], a static helper with no callsites, removed; `ClearableSynchronizedPool` [7], an orphaned Kotlin sync wrapper never instantiated, deleted; and `simulateAttachForTesting()` [8], a test-only ReactRootView method with zero test callers, removed. Native layers are also documenting I18nManager behavior that's been silently misunderstood [9].
Action items
- → Watch React compiler PRs #36729 and #36730 for merge; these cut serialization overhead on every compile facebook/react [monitor]
- → Review React Native cleanup merges if you have legacy code paths referencing JSIndexedRAMBundle or the removed test helpers facebook/react-native [plan]
- → Update any I18n edge cases that relied on undocumented iOS I18nManager behavior; clarification is now in the code facebook/react-native [plan]
References
- [1] [rust-compiler] Return the compiled AST by value instead of JSON ↗ facebook/react
- [2] [rust-compiler] Return the compiled AST by value instead of JSON (#36729) facebook/react
- [3] [rust-compiler] Carry uninspected AST subtrees as raw JSON text ↗ facebook/react
- [4] [rust-compiler] Carry uninspected AST subtrees as raw JSON text (#36730) facebook/react
- [5] Remove dead JSIndexedRAMBundle from cxxreact facebook/react-native
- [6] Remove dead telemetryTimePointToSecondsSinceEpoch helper facebook/react-native
- [7] Remove dead internal class ClearableSynchronizedPool facebook/react-native
- [8] Remove dead test-only method simulateAttachForTesting from ReactRootView facebook/react-native
- [9] Add comment to clarify how I18nManager works (#51661) facebook/react-native
FAQ
- What changed in Meta on June 11, 2026?
- The Rust compiler is ditching wasteful serialize-deserialize round-trips by passing typed ASTs directly to consumers instead of converting everything to JSON and back.
- What should Meta teams do about it?
- Watch React compiler PRs #36729 and #36730 for merge; these cut serialization overhead on every compile • Review React Native cleanup merges if you have legacy code paths referencing JSIndexedRAMBundle or the removed test helpers • Update any I18n edge cases that relied on undocumented iOS I18nManager behavior; clarification is now in the code
- Which Meta repositories shipped on June 11, 2026?
- facebook/react, facebook/react-native