Is this Android build time & memory increase expected? #268
-
I am on react-native version "0.76.6" at the moment with the new architecture off. My builds are failing in CircleCI when trying to turn on the new architecture. I did a test build with a larger executor and it passed, but I'm hoping to not have to pay 2x or more for android builds just to be on the new architecture. I'm mainly wondering if this memory jump is expected and caused by react-native itself or possibly some dependency of my app. Build memory usage without new arch stays just below 8GB and takes 12-14 mins![]() Build memory usage with new arch gets above 12GB and taks >20 mins![]() The only difference between these two builds, besides the larger executor in circleci config, is that I changed We use the react native community circleci orb and their linux_android executor as such:
I'll be happy to try to share any additional information that I can. I'm hopeful that others have run into this and solved or, or just know what I can look into to try to mitigate this memory increase if its possible to do so. Thanks in advance for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The failed build output is here, and it ends with:
Coul it be |
Beta Was this translation helpful? Give feedback.
-
Without seeing your project is hard to say if there is anything that is causing this in particular. What I can say is that with We invested significant amount of time on build optimizations though, so you should probably look into setting up some caching for your CI. If you're rebuilding everything from scratch everytime, the time is going to add up. But if you cache the build output, normally an app rebuild should take a couple of minutes. That's particularly true if you have 3rd party deps such as |
Beta Was this translation helpful? Give feedback.
Without seeing your project is hard to say if there is anything that is causing this in particular.
What I can say is that with
newArchEnabled=true
, you'll be also compiling C++ code. That's due to the New Architecture of React Native being in C++, so there is one compiler more to invoke so builds we be (sadly) a bit slower than old arch.We invested significant amount of time on build optimizations though, so you should probably look into setting up some caching …