-
Notifications
You must be signed in to change notification settings - Fork 196
Description
When using react-refresh-webpack-plugin
,
On incremental compiles (making changes in codebase and then saving, triggering a recompile), we observed that the memory increases a lot while the recompile is taking place and once it is done and the changes are reflected on the browser, the memory doesn't go down to anywhere around it was before (garbage collection). Due to this, each incremental compile adds on around 400-500MB which leaves around 300-400MB unretrieved, resulting in high memory consumption after a few recompiles and working on an 8GB mac becomes very difficult where webpack started with consuming 5GB in the beginning and after a few incremental compiles, it reaches to 6.5GB.
On the other hand, when we use react-hot-loader
, the garbage collection is very ideal. During incremental compile, it consumes additional 300-400MB, which it leaves almost fully within 5-10secs after the compile is done. Memory doesn't pile up at all.
Would be great if you could take a look.
Thanks!