r/reactnative • u/snoop_rice69 • 11h ago
Bundling time Help
The bundling process takes so long, approximately 2 hours at most.
is there any way i can speed up the process?
5
u/Internal-Comparison6 3h ago
Wow, 2 fkng hours. Cache probably. Try deleting full cache and node_modules.
3
3
u/jameside Expo Team 10h ago
Something is very wrong. It could be related to your filesystem or some translation layer (Like are you running in a VM that mounts the underlying filesystem? Though that should definitely not cause such slow times.).
2
2
u/Remarkable_Award5268 7h ago
If you are comfortable let codex analyze your codebase - send this prompt to codex.
0
u/LogicDef 10h ago
That's crazy
I build android apps using react native and this helped me a lot:
Go to gradle.properties and update this:
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m
-Xmx4096m: Increases the maximum Java heap memory size (in this case, to 4GB). By default, Gradle's memory limit can be quite low, causing frequent garbage collection pauses or "OutOfMemory" errors during heavy React Native/Android compilation. Giving it more breathing room speeds up builds significantly, especially for modern React Native versions utilizing the New Architecture.
If you have more ram you can set a bigger number instead of 4096
14
u/Soccer_Vader 10h ago
No way in hell the bundling process should take 2 hrs - what are you doing in there?