Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why Electron apps are fine (nielsleenheer.com)
14 points by todsacerdoti on Aug 31, 2021 | hide | past | favorite | 24 comments


They are not.

The fact is that you can run many more native apps at the same time than Electron apps. The Electronification of nearly all major apps has meant that even 16GB of RAM is starting to look weak. Yes, I paid for my RAM. No, it's not bloody meant for you. Keep your hands off off it.

If I could, I would run a native app instead of yours, but in many cases Electron apps are the proprietary clients to various SaaS offerings that don't offer any interop with alternative clients (Slack, Discord, Teams).


> If that Electron app is valuable to you and you have enough memory, why worry about it?

What if I don't? Why should everyone use 16GB of RAM for tasks that can be achieved with 4 natively?

>That is huge. That means I can only place 2500 copies of that app on my 1 TB hard drive. The shame! Yeah, hard drives are large enough to not care about this.

A lot of budget devices ship without mechanical drives and with 128 or 256GB SSDs nowadays.

More RAM and more storage might sound like "just a couple of bucks" to people in first-world countries but they are still fairly expensive elsewhere, where people also don't earn as much.

This article feels motivated by part "just buy more stuff, you poors", and part "stop attacking Electron devs because I am one and it makes me feel bad."


To put this another way:

I have an Electron-based chat client that consumes 265 MB of disk when installed, plus about 180 MB of data, most of which looks like it comes from Electron rather than chat-related stuff.

A native client for the same chat service consumes about 10 MB installed, plus about 15 MB of data.

That's a 10x-25x explosion in SSD wear with every app update, which happens frequently. There is also an explosion in ongoing wear every minute that I leave it running. I haven't measured the latter, but judging by how often Electron writes cache and web session data, it is surely significant.

Electron is incredibly wasteful. If a web interface is absolutely necessary, please just serve it on localhost and let me use my existing browser.


> Electron is incredibly wasteful. If a web interface is absolutely necessary, please just serve it on localhost and let me use my existing browser.

I know of a couple that does something like this.

FSBox for programming SFPs install a driver and a runnable tray software, you configure it through your web browser.

SolarWinds backup, installs a tray but opens a web browser to 127.0.0.1:5000

Syncthing runs a local webserver too

As you're saying, I wish more would support this way, I don't want someone's outdated browser when it can be a tab in my Firefox


Or how many kids are using some of the newer netbooks that maybe only have 32 GB or 64 GB eMMC. And that is becoming more and more common. Going into Walmart last, I think most of the computers in the electronics section had these smaller eMMC drives.


There should be an electron competitor that replaces the chromium part with any installed browser (on any platform) and the node.js part with a library with a C interface that can be interoperated with from my language of choice. That should be possible in <1MB. There libraries that do that, but they either lack important features or are too tightly integrated with a specific programming language to use.


I've never used it, but I've heard good things about Tauri: https://github.com/tauri-apps/tauri


I saw it, am impressed with it. But can it be used from other languages? Maybe I need to look at the API, if it can easily be wrapped.


No they are not.


I'm with this article. It's a ton of making mountains out of molehills. People chill out.

In truth it doesn't really affect you. You're applying particular, selective tastes. This article covers those preferences well & gives them, in my view, the just & fair treatment they deserve. And concludes that those factors don't really matter. I personally concur with the author's review of the assorted complaints.

I'm ready to be surprised, but I just want to note how dangerous this post is to write: I'm arguing against people who complain, arguing against a vocal loud echoing force that is all over the place, complaining about this issue. This comes up repeatedly, people seem really distressed. Trying to counter that is an impossible task. These people will not be sated. We could fix the re-distribution of the runtime & it wouldn't be enough. We could get slack to fix their terrible memory-hungry code & it wouldn't be enough. I've picked a poor group of people to disagree with online: victory against this group is impossible. But I continue to think this is an extremely vocal minority, that it is an prevailing attitude & disagreeableness which we should identify & snuff out, which we should be aware of in ourselves & in others: our desire for things our way, and our willingness to permit other options.


It affects somebody. Perspectives like this are so America-centric.


But mostly it's just a bunch of crying & whining by huge online babies with 16GB+ of ram.


>But mostly it's just a bunch of crying & whining by huge online babies with 16GB+ of ram.

Mate, I don't know about that but the only belly-aching going on in this discussion emanate from your replies.


That's not how I see it. I see everyone else as being way too uptight & worried about something that's not a problem, or attributing to Electron the faults of Slack. I, like the author, feel like an active defense is necessary. It's time to let these boorish unceasing whinings go on unchallenged.

My bloody daily driver linux laptop is 4gb, and near to 5 years old. Electron poses no challenge whatsoever to me. It has no negative impact on my life. And it's a far far far better far more compelling development environment than the alternatives, of which very few are cross-platform.


My preferred alternative would be something like Sabnzbd. It's a headless daemon/service that runs. If you go to it in the taskbar & click "Show interface", it opens a web browser pointed at localhost.

I see very little reason for 98% of electron apps to do anything other than this. Apps are no longer in the business of distributing their own virtual machine (the web browser) and there's less memory usage.

That said, plenty of great electron apps run at well under 300MB. I'd wager that browser runtime accounts for like a bit under 200MB of that usage. That's sizable but even on my 4GB laptop seems ridiculous to squabble about. Personally I think people complaining loudly about this level of usage are people who'se opinions should be marked as not important, that they're people who generate more stress for themselves & others than any of us should voluntarily opt to listen to. It's controversial to me that anyone would make such a stir & controversy about this. Personally I want online social defense tools to help me remember & be warded off from people for whom this is an issue. I'm sure many of them probably would like to be warded off from me in the future. There's so many more interesting places to go stake myself.


Yeah they’re fine when you have 64GB of RAM and 4TB desktop. The default configuration for majority of the laptops are 8GB Ram and 256Gb SSD. Electron is a first world mess inflicted on everyone, not everyone is running a top notch desktop. And running 4 apps is not the goal of using a PC.


I agree with this 100%. No one has ever said, "Gee, I love Slack but it's HTML/JS/CSS so it's a no for me." The bottom line is users don't care. You can make every bit as good a UI in Electron. And you do have the computing power to do it.


If users don't care why did he have to write that blog post to begin with.

I'm a Slack user and I do care that it's running like a hog.


Users don't care and I don't care.

Can I run the app? Can I use the app? Does it do what I need it to do? Do I have a good experience? If yes, then I'm good. I don't care if it's Electron.


This isn’t a very convincing article at all.


I've never seen so many bad opinions in a row. Normally there's at least one reasonable point, but this whole article is a garbage fire.

Electron is a nonsense technology that is completely without worth, and web developers should never have been given access to desktop development tools.


Thoughts on PWAs?


I don't like PWAs (or modern web dev in general), but at least

1) Multiple PWA can run in a shared browser instance without the considerable overheads of Electron apps,

2) They tends to be a lot better optimised than Electron apps since it might be accessed from a phone or other minimally resourced platform, and

3) I can still use my standard browser tools and add-ons such as ad-block, etc. - blocking telemetry and social media tracking usually considerably improve performance. Not that it's impossible to do this with Electron, but generally speaking I'm past the stage in my life where I can be bothered working around crap like this and would rather just not use Electron apps at all.

So I have less of an issue with PWAs.

Another gripe I have with Electron apps is under Windows they generally want to run out of the user's AppData directory, which is incompatible with secure environments where Software Restriction Policies are used to prevent execution in user-writable places. You end up having to poke a bunch of holes in your security to make things work, and indeed there have been attacks targeting Electron apps such as the Teams squirrel updater mechanism[1].

[1] https://techmonitor.ai/technology/cybersecurity/microsoft-te...


Thanks for the well-articulated insights! I'm surprised that companies choose Electron over PWAs for a lot of scenarios that would have made more sense to just make a PWA.

I really feel you on the AppData problem, glad it isn't just me. Sometimes feel like I'm becoming a luddite over it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: