6 ms·
Where is this 1-2GB number coming from? I'm running a fairly large Electron app and the combined memory usage of its processes is about 250-300MB.
by efdee 7y ago
Where is this 1-2GB number coming from? I'm running a fairly large Electron app and the combined memory usage of its processes is about 250-300MB.
- colejohnson66 7y agoI’m spitballing, but Chrome does have issues with high memory usage[0]. But also, VS Code can take up multiple gigabytes[1] on a large project. [0]: https://lifehacker.com/why-chrome-uses-so-much-freaking-ram-1702537477 https://lifehacker.com/why-chrome-uses-so-much-freaking-ram-... [1]: https://stackoverflow.com/questions/53658769/why-vscode-require-so-much-memory-how-to-make-it-more-clean https://stackoverflow.com/questions/53658769/why-vscode-requ...
- derefr 7y agoWhat’s its uptime? A lot of Electron apps—even ones that use minimal local JS, serving mostly as a webview—accrue base overhead as you use them, then keep it around even when you close their main window (and thus release their main Chromium-side render context), as long as the process stays alive. They’re caching stuff (like, as I said, rendered font glyphs, or network responses.) I have a copy of Slack running that’s using 2GB right now, with no window open.
- efdee 7y agoMultiple weeks of uptime (on a laptop that is used daily and hibernates at night).
- dreamcompiler 7y agoThey might call this "caching" but it's still a memory leak. Over time, the application consumes increasing amounts of a finite global resource while not appreciably advancing its own progress, and negatively affecting the whole system. That's a memory leak. The solution is for operating systems to inject deliberate back pressure on memory allocations for user-selectable applications to stop them from behaving this way. "No memory for you. Try mallocing smaller chunk. Maybe I grant; maybe I don't. Maybe I just kill -9 you if you bug me too much." This is exactly how I wish my OS would treat web browsers.
- csnover 7y agoI’m currently running three Electron apps: Spotify, Skype, and VS Code. Spotify: 1083.7 MB. VS Code: 890.9 MB. Skype: 406 MB. In the past, I’ve had projects open in VS Code which have caused that number to shoot up into the multi-gigabyte range. Of course this is all anecdotal but I am pretty sure these numbers come from actual experiences that people are having with Electron apps.
- gridlockd 7y agoOver here, the base overhead of an Electron window is around 60MB. How do you know it's not those applications allocating a lot of memory that is causing all this usage?
- filleduchaos 7y agoWhat's the uptime on that "base application" and what does it do?
- judge2020 7y agohttps://github.com/electron/electron-quick-start https://github.com/electron/electron-quick-start ~60mb memory usage at startup.
- filleduchaos 7y agoSo an "application" that literally just displays Hello World and no indication of uptime. Right, I'm convinced.
- bavell 7y agoIt shows that the framework itself only uses 60MB and implies any higher usage is due to the application built on top of electron. I'm not sure why uptime matters unless you're assuming there are memory leaks?
- rco8786 7y agoCurrently Slack is taking ~1.2GB on my laptop