You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android build: Allow Gradle to use another 25% more memory
After the upcoming RN v0.68 upgrade, I start seeing failures in
`tools/test native` with the error message "Java heap space".
So, I guess we need to let Gradle's JVM use still more RAM.
Previously in 1e2390d in 2020-09 we increased this limit from
half a GiB to a whole GiB. Make it 1.25 GiB; that seems to be
enough for now.
Compare facebook/react-native@a2a703247, which happened on the
way to RN v0.68. That one had the explanation
> Updates maximum heap size for the gradle build to account for
> building RN from source when new architecture is enabled.
which doesn't apply as we aren't yet adopting RN's New Architecture.
But perhaps if we did, we'd need to increase the heap size even more:
that commit takes it to 2 GiB.
Even on my desktop with its 32 GiB of RAM, that kind of memory
consumption can get to be a strain together with everything else:
Android Studio; an Android emulator; a browser; VS Code, which is
basically another browser; Flow; and so on. More RAM used by
programs directly means less for the system's disk cache, which
means everything runs slower as the machine keeps re-reading stuff
from disk, stuff that it just read a little while ago but didn't
have the spare memory to keep around. Hence trying to keep this
number down as long as we can.
0 commit comments