Files
react-native/scripts
Pieter De Baets bf0e377c0a Reduce JNI allocations when importing native maps (#58274)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58274

`ReadableNativeMap` materialization copied keys and created temporary JNI references for every imported type. Cache pointers to the stable native values and reuse global `ReadableType` references so importing maps and arrays does less allocation and lookup work.

Writable maps can continue mutating after materialization because `folly::dynamic` stores object entries in reference-stable `F14NodeMap` nodes.

Changelog: [Internal]

Reviewed By: christophpurrer, rubennorte

Differential Revision: D118277119

fbshipit-source-id: 955a60ef7f1eb4cb7549d64caa1238416e90b223
2026-09-04 05:02:48 -07:00
..