Files
react-native/ReactAndroid
Pieter De Baets b3c69e85d7 Use AssetManager buffer instead of copying bundle
Summary:
The current JSLoader implementation (on Android) will copy the buffer into a JSBigBufferString during startup. This duplicates work Android is already doing (it allocates creates a copy of the bundle in memory while decompressing the asset from the APK) or worse, if the APK is mmap'ed this will unnecessarily create dirty memory.

The risk with this approach is that the bundle loaded from disk is no longer \0 terminated, but that's also the case for the bundles we load with `JSBigFileString` and is not an issue as  far as I can tell.

Changelog: [Internal]

Reviewed By: mhorowitz

Differential Revision: D33792735

fbshipit-source-id: 61fc089a223f3602d3575340d79a8de2ec92d8a0
2022-01-28 02:55:42 -08:00
..

Building React Native for Android

See the docs on the wiki.

Running tests

When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.