Re:Ask HN: How to optimize Electron apps?
by imtringued on Thursday December 27, 2018 @05:13PM
(#18773096)
I remember there being a bug in chrome which causes it to keep loaded images in memory forever, this can cause RAM usage to grow into the gigabytes range but this only affected electron applications. Additionally in a code base as big as chrome it wouldn't surprise me if there are thousands of tiny variants of those bugs that leak a few 100KB of RAM here and there which then add up to 100MB or more even in a sufficiently optimized application.
I think the fundamental problem is that chrome just wasn't built to host a single application that never refreshes. It's optimized for opening dozens of websites and cleaning up resources in between page loads. This requires a certain amount of memory no matter what you do.
In terms of rendering performance there aren't any significant problems if the DOM manipulation is done correctly. It shouldn't be any slower than say Qt assuming properly written JavaScript.
I'm sure a solution can be found to solve those problems. However the sad truth is that no one who chooses electron cares about any of that and would rather point out how cheap RAM is and that you could solve this problem by spending 60€ on another 8GB of RAM.
I think the fundamental problem is that chrome just wasn't built to host a single application that never refreshes. It's optimized for opening dozens of websites and cleaning up resources in between page loads. This requires a certain amount of memory no matter what you do.
In terms of rendering performance there aren't any significant problems if the DOM manipulation is done correctly. It shouldn't be any slower than say Qt assuming properly written JavaScript.
I'm sure a solution can be found to solve those problems. However the sad truth is that no one who chooses electron cares about any of that and would rather point out how cheap RAM is and that you could solve this problem by spending 60€ on another 8GB of RAM.