forked from expo/fyi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1c9d53
commit 7282a0c
Showing
1 changed file
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# JavaScript bundle sizes | ||
|
||
React Native JavaScript bundles are usually significantly larger than app bundles on the web because the runtime and core components result in a ~700kb baseline size. This is not as big of a concern as on the web because JavaScript bundles are typically not downloaded at the time an app is opened, as you would on a website, rather they are embedded in the app binary or downloaded in the background with [expo-updates](https://docs.expo.io/versions/latest/sdk/updates/). | ||
|
||
Large bundles can impact startup time because they need to be parsed and executed when the app launches, and this can be slow on low-end devices. You can improve startup time on low-end Android devices in the bare workflow by opting in to using [Hermes](https://hermesengine.dev/) and precompiling your app to Hermes bytecode at buildtime. | ||
|
||
You can analyze the contents of your JavaScript bundles using [react-native-bundle-visualizer](https://github.com/IjzerenHein/react-native-bundle-visualizer). It will show you how much each package in your project contributes to the overall bundle size. |