Hacker News new | ask | show | jobs
by huijzer 266 days ago
Don't Electron-based apps cause lag on basically any system?
5 comments

I know it's a defacto complaint to leverage against Electron apps, but memory usage notwithstanding, I've never run into much lag issue on any major Electron app.
Surely there is a more effective way to write an app than to bundle an entire end-of-life browser and Node.js runtime into a 600MB monstrosity.
Of course there is, but not every decision in computing is (or should be) about raw efficiency.
Electron apps don't have to be 600 MB. VS Code is an entire fully-featured IDE and is a 90 MB download.
VS Code package in my applications folder is 600+ MB.

The Electron Framework.framework it contains is 400+ MB alone. I don't understand where you come up with your 90 MB figure?

The VSCodeUserSetup file from https://code.visualstudio.com/download is in the 90MB range.

Perhaps this file is just the installer and the actual system files are much larger? Or maybe your 400MB figure comes from a bloated install? Just speculating here.

Presumably the setup file is compressed, and the installation on disk isn't
A compressed download is my guess. The easiest way to predict if an app is using Electron is to see if the download is around 90 to 130 MB. Especially if that size feels unreasonable for the functionality that it offers.
My package app is 90mb
It depends. Numerous times when internet is spotty Slack and Discord both on different occasions have brought my systems to a halt until they can complete whatever task is stuck waiting (or I force close them).

It's really fucking obnoxious that somehow a goddamn web app in a wrapper is managing to cause system wide hangs.

True, i'm gonna start limiting electron apps CPU and IO percentage to not halt everything
I think that's probably a recipe to hit the limits more often and end up being more frustrating, depending on your hardware.
Can't you interrupt them (aka SIGSTOP) instead? Then you could resume them, instead of reopening them and potentially using state.
Perhaps, but this specific case appears to be related to (ab)use of a private API on Electron's part.

https://github.com/electron/electron/issues/48311#issuecomme...

It's in the runtime specifications, I think.

"Application should use all cores and all available memory."

In the past few years, the only applications i've seen run amok with memory usage at least were of course Electron based.

However, note that this problem is on Mac OS "users had too much contrast so we ruined it" 26 Tahoe. It's part of the early adopter experience.

No, they typically do not interfere with performance at the OS level. They may be wasteful with resources that are limited — CPU/GPU/RAM/IO — but for them to interfere with system function at this level is not the usual bloatware problem.
I’ve never noticed anything before, though I’m sure their performance is worse than native apps. I think the M series has so much headroom at this point that you can get away with a lot.