3 ms·
> Each desktop app is shipping almost a full browser Unless you use the OS included web view. We used this approach in a project last year and we went from ab
by pier25 7y ago
> Each desktop app is shipping almost a full browser
Unless you use the OS included web view.
We used this approach in a project last year and we went from about 100MB for an Electron macOS app to 4MB. Memory consumption also went down drastically although I don't remember concrete numbers.
> RAM/CPU bloat issues are real
If you only use the web view for the GUI it should be pretty lean.
> there's far too much overhead for trivial things
You can easily solve the IPC problem by using a local web server and making requests from your web view. Also, the IPC overhead is only a problem in intensive use cases many of which can be mitigated by moving logic away from the web view and into your native layer.
- kllrnohj 7y ago> If you only use the web view for the GUI it should be pretty lean. That only keeps your binary size lean. It doesn't help at all for your RAM/CPU usage issues. So far nobody has made a lean web view in terms of RAM & CPU/GPU usage that can also handle modern JavaScript & CSS. It just doesn't exist currently. > Also, the IPC overhead is only a problem in intensive use cases many of which can be mitigated by moving logic away from the web view and into your native layer. That requires you to have a native layer at which point why bother with the limitations & complexities of a web view instead of just using QT, GTK, Swing, etc...?
- pcr910303 7y ago> It doesn't help at all for your RAM/CPU usage issues. Well, it does, because most likely the system webview is already loaded on ram. The problem of electron is that every single electron app uses a different instance of Chrome — webviews are shared, and unless you have no browsers/apps with webviews running, it can just share the memory already loaded.
- kllrnohj 7y agoOnly the binary is shared and not even all of it. And it's not at all the dominate usage of RAM anyway. See all the memes about chrome and ram usage - and that's all shared across tabs!