Lots of memory used when opening new windows within a electron app


#1

Hey guys I’m creating a very skinny electron app (It just takes in a command line parameter and shows a web page in electron based on input). For links in the webpage shown I just have it create a new window. I’ve noticed for each new window created about 150-200 megs of memory is taken up based on the webpage shown in the new window . Is there a way to significantly decrease memory usage for the new windows which just contain a webview?


#2

In Electron, each window is a new process. This means that a new copy of Chromium and Node have to be loaded to provide the features that Electron offers. If you want to use less memory, you could create a tabbed UI that displays the new information in the same window as the old information.


#3

I was figuring based on the memory usage that new instances were being created thank you for comfirming that suspicion . Thanks for the suggestion I’ll go ahead and change it to have tabs for each new instance of electron I need.

Thanks again!
-Zach