I used Electron apps on Linux and typically memory usage doesn't get below 250-500 Mb.
Here is an example for Skype: 220 Mb of swap + 388 Mb of PSS (Proportional set size).
Yikes.
The option isn't electron vs native, it's electron vs nothing.
Case in point, if I run Slack in Safari, it runs better than the electron version. Functionally, it’s identical, except the scrolling is now native and feels a bit better integrated in macOS. So what’s the point?
(That isn't to say that the web version of Slack isn't horribly engineered too, but it poses far less of a problem)
The reason why this pattern isn't used more commonly is the fact that right now web browsers simply aren't designed to be used this way unless you start a new instance for just a single app. The second reason is that electron developers are lazy. They only want to test a single browser (or browser version) and are perfectly happy that this means Google can get away with shady things.
Nobody is asking that, there's a crowd in here that restates the same three points about memory, performance and native UI about once a week.
I dislike waste, I have written assembly code for tiny processors. And yet, I run several Electron apps on my 8gb 2013 Macbook Air and it runs fine, especially VSCode. I am picking that over my previous choice which was native (vim), because I think it's better.
The fact that it works the same on OSX and Linux is even better.
Where else would users complain about undesirable developer trends if not on a developers' community?
For the record, I do think there are problems with Electron, just not the ones usually mentioned. A big (huge!) problem in my opinion is that two windows can't share JS context. It's the reason why VSCode is way behind in multi-monitor support for instance.
Say a somewhat below-average user has 6GB of memory (I'm being generous here; plenty don't have more than 4GB). Today is a worse-than-usual day, and 4GB are taken by everything that isn't Electron because 40 tabs are open for a research paper due tomorrow. That leaves three gigs to spare. Now the user starts up some Electron apps.
- Music player? +400mb
- Note-taking? +300mb
- Messaging? +500mb (thanks, Slack!)
- News? +300mb
- Editor/IDE? +500mb
That's it. No more space. And that's before we even begin talking about what we're putting that dual-core CPU through. Battery life is a joke at this point.
A comparison: My OS, window manager, mail client, password manager, taskbar, music player (mpd+ncmpp+clerk.pl), file manager, system monitor, RSS reader, podcast player, IRC client, and editor/IDE (neovim+language servers with diagnostics, gotos, floating documentation, and refactoring all running) barely use over 1GB of memory, combined. Let that sink in. Essentially, a single electron app using 500mb of memory would increase my memory usage by 40%.
People shouldn't have to throw away/upgrade their computers every four years. I'm still rocking a 2013 HP Elitebook G1 with a Haswell i5 as my secondary machine. It runs just as well as my desktop for anything except heavy websites with JS enabled, compiling, and graphics-intensive work. I plan to either continue using it for another few years or donate it and switch to a more lightweight \$199 Pinebook Pro. Using less powerful hardware forces me to empathize with users who are using tech from the past rather than the future, because that's my job. I build tools for people besides myself to use.
If you must use the web, consider making your "app" start a local web server and launching the users' preferred browser for a more lightweight solution.
I'd pick the native version every time, but there is no native VSCode, Atom, Slack, or Whatsapp.
I use Sublime because it's native and I don't use too many plugins but a lot of people prefer VSCode.
I cannot fathom the indignity required to care about that difference.
Your failure to empathize seems like an odd thing to brag about. Even if you have plenty of memory available, you should be capable of empathizing with people who are short on it.
I'm glad that it still exists
https://imgur.com/a/XnCOHUD
And mind you, GitHub Desktop is taking that much just for showing a mostly empty window! while Fork and Tower are displaying a lot more UI, more controls, trees, custom drawing, more text, and have overall more features (best of all: spell checking for commit messages because all native text fields get it for free.) You can try it on your own machine and compare them.
Now yes Electron has made life very easy for some developers and some apps wouldn't even exist if not for Electron, but why, as a user, should I pick an Electron app over native alternatives?