microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.35k stars 1.14k forks source link

Reduce building react-native-windows memory and disk space requirements #8103

Open jaimecbernardo opened 3 years ago

jaimecbernardo commented 3 years ago

Currently, building a react-native-windows application with some native modules uses a lot of working memory and disk space.

Since native modules for react-native are traditionally developed for Android and/or iOS, we can expect that OSS community members who want to port their modules to react-native-windows will likely use a VM for developing/testing Windows ports. The high memory and disk space requirements can make this a frustrating experience.

We've experience high memory pressure/swapping issues when building react-native-windows applications, most likely due to the C++/winrt codebase, causing OS hangs and failed builds.

A big chunk of free space is also needed for react-native-windows applications build files. After having built react-native-gallery for both Debug and Release, the folder is occupying > 35GB in disk space.

asklar commented 3 years ago

This will be taken care of by binary distribution (NuGet) as well as improvements to the cppwinrt tooling

SamuelScheit commented 2 years ago

My build is currently failing, because of Out of Memory Exception. I have 8GB of RAM in my Windows development computer.