news.ycombinator.com

Ask HN: Why / Why Not Use Electron?

Updated 3/31/2025

Excerpt

eivarv on July 19, 2016 In my experience, Electron apps tend to be bloated, not very performant and/or energy inefficient. This means that developers make a choice regarding users' disk space, user experience and battery life. The extent to which users notice any of this is of course dependent on a combination of their machine (e.g. old/new hardware, laptop/desktop) and the application being run. Also, since you don't use the platform's native widgets, there's poor (or nonexistent?) accessibility features for users with special needs - not to mention the implications (HCI-wise) of redefining/replacing standard interface elements. In my opinion, all this reeks of poor design, and is arguably (in some cases) downright user-hostile and unethical. … Cons: - Memory usage: An Electron app is essentially a fully-featured Chromium browser and a Node process that communicate via IPC. This might be a bit bloated for some applications, particularly if you're targeting systems where memory is limited. - Large builds: Packaged Electron apps contain everything they need to run so they're typically quite large. Don't be surprised if your "hello world" app ends up being over 30MB. - Not truly native: Sure, you can make your app look great but the only way you can make it look 100% "native" is to use the widget toolkits of whatever operating systems you're targeting. Electron does not give you access to this. - The DOM can be your worst enemy: This is where the performance issues of many Electron apps (Atom comes to mind) arise. Depending on the complexity of your app, you'll want to either limit how many elements you render to the page at any given moment or look into using something like HTML5 canvas to render. … But the idea of using a fucking gigantic framework (I mean think about it, just Electron by itself is all of Chromium basically, or at least the big complicated exciting bits) is a massive code smell to me. It's like using an ORM or a heavyweight web framework: whenever you're leaning on that much code just for your baseline of functionality, you're making a lot of assumptions that should, as a developer, at least give you pause. … In my experience, Electron apps tend to be bloated, not very performant and/or energy inefficient. This means that developers make a choice regarding users' disk space, user experience and battery life. The extent to which users notice any of this is of course dependent on a combination of their machine (e.g. old/new hardware, laptop/desktop) and the application being run. Also, since you don't use the platform's native widgets, there's poor (or nonexistent?) accessibility features for users with special needs - not to mention the implications (HCI-wise) of redefining/replacing standard interface elements. In my opinion, all this reeks of poor design, and is arguably (in some cases) downright user-hostile and unethical.

Source URL

https://news.ycombinator.com/item?id=12119278

Related Pain Points