I think a better platform could be a highly stripped down version of web to the point where it is not even web anymore but still familiar and simple to use. Kind of like what Flutter did (Desktop support in flutter would be pretty great actually). Either that or a serious react native platform/framework that focused on Desktop computers.
Maybe if they switch to Servo it might use a little less RAM, but inherently it's always going to be pretty heavy.
This to me is the crux of the issue. Github has a lot of great engineers but they're less likely to be versed in C/C++/whatever else is required to make this kind of thing truly succeed.
It really begs the question of what Microsoft were thinking the day they decided to build Code on it.
Rendering HTML and running a JS VM might seem like a long way around to get a desktop interface, but you're reading this in just that context, alongside a couple of dozen tabs, many running webapps with complexities to rival Microsoft Word '97. You're not using 4GB per tab; you probably aren't even getting up to 4GB with all your tabs.
Electron can do better.
Think of electron as a single tab open in a browser instance. If you open 12 tabs in chrome, it doesn't use 12x the RAM, because most of the initial RAM is used maintaining the browser instance, not the rendered tab. most electron apps don't have "tabs" but if they did they wouldn't multiply the memory usage either
I'm not saying it does or doesn't, and I'm not defending it, I just think we need to be a little more fair with our comparisons
I did a comparison a while back (though I'd hardly call it scientific). I built a basic "hello world" Electron app, which consumed 69MB of RAM on Windows 10. When I opened the html file of that app in Chrome it took 82MB.
https://github.com/mozilla/qbrt
I really hope it sees more development
what?!?
On 4gb it only takes a couple of Electron apps to eat half of my ram or more. Factor in the OS and a browser or two and it's already swapping. These are often just chat apps or something, they may be good apps but they aren't doing anything fundamentally new and whatever they replaced probably needed <100mb of ram.
It used to be that developers published minimum and recommended system requirements for their program. Maybe Electron developers need to start disclosing that 4gb ram is the minimum to use their apps and 8gb is recommended.
There don't seem to be many benefits I get from an Electron app that I couldn't be getting by just running Chrome in app mode with a dedicated profile (which consumes a lot less ram).
I would prefer to see developers release a web app first and then perhaps offer an Electron version if you've got ram to burn.