5 ms·
In principle, there is no reason why Electron must be so memory inefficient, right? We could optimize it in a way that it only loads resources it really needs.
by albertzeyer 7y ago
In principle, there is no reason why Electron must be so memory inefficient, right? We could optimize it in a way that it only loads resources it really needs. So in case of a video chat app, it would need video, audio, web RTC, a bit of HTML and JS. That should be possible to fit in a few MB of RAM. Only because Electron supports much more doesn't mean it must take so much memory.
Maybe it would make sense that we just focus on optimizing Electron for this case. That might take a bit of effort, but that effort might be worth it.
- untog 7y agoAnother route is to share the same resources between apps, i.e. make a progressive web app. I haven't used the Jitsi desktop app so I can't speak to it, but I'd be curious to know what features are missing from PWAs that mean a native wrapped Electron app is necessary.
- albertzeyer 7y agoBut being more specific here: What exactly are the shared resources? The binaries? That could maybe save a couple of hundred MB but this is maybe still not the biggest part. The remaining memory is probably sitting there in memory allocations of JS or so, and I don't think that can be shared.
- untog 7y ago> The remaining memory is probably sitting there in memory allocations of JS or so I'm not so sure about that. 5 Electron apps takes up far more memory than 5 tabs open in your browser because there are 5 copies of all the other browser resources. I don't know exactly what they are but anecdotal observation of using Slack and similar apps as browser tabs shows much less memory use. It makes sense: the browser rendering engine and JavaScript engine are going to occupy memory themselves.
- nieve 7y agoYes, as evidence for this web browsers sitting at an empty new tab page are generally still using at least 100-200mb to do nothing. The likelihood that most of that is not the part that's most vital and feature rich is low.
- BiteCode_dev 7y agoMS does that pretty well with VSCode I think. It doesn't seem to be the default experience though.