5 ms·
I really want to use Electron for a project I have coming up since it checks all the boxes, but all I ever see are complaints about the performance :( Is the p
by azhenley 8y ago
I really want to use Electron for a project I have coming up since it checks all the boxes, but all I ever see are complaints about the performance :(
Is the performance really that bad? Plenty of successful applications are using it. Is there a fix in the horizon?
- msvan 8y agoI don't think it is fixable. Embedding Chromium is going to eat computer resources. This is the price of simple development for the desktop.
- ilikehurdles 8y agoTry the applications and judge for yourself. There are tons of them. Most people are probably OK with the performance of apps like Spotify, and have never come close to exhausting their memory or disk space. I think being able to use HTML and CSS for layout, but with full access to native APIs, is a huge reason electron keeps winning despite the hn complaints. I’d be happier without it being JavaScript-based, but there are nice languages that compile down to it, like Elm and clojurescript.
- Royalaid 8y agoI would also like to echo this. Yes most of everyone on HN hate Electron and they can point out any number of reasons why it's bad, and they would correct. In spite of the technical problems Electron is still seeing growth and continues to ship in new products. If you think Electron works for what you need I would say use it and just ship, once you have more resources reevaluate if it is or is not working.
- ionised 8y agoConsider that each Electron app runs its own instance of Chromium. Chromium itself is a memory hog and apps like Slack routinely take up to a gigabyte of memory. For a fucking chat app. How many Electron apps does the average developer run on his machine now? I'm back-end developer and I still need four or five Electron apps running to do my job. All in all they are taking up between 4-7Gb of memory. That's just absurd to me, and we are all on 2017 MacBook Pros with 16Gb RAM. Combined with Docker, IntelliJ, Robo3T etc, I'm pushing up against my RAM limit frequently, because Electron apps are all a bloated mess. Every single one of them. It's even worse if we start getting multiple end-user apps are written with Electron, because the average consumer machine doesn't have a lot of memory like developer machines tend to have. This kind of development shouldn't be encouraged in my opinion.
- bengotow 8y agoWell, performance and memory usage are two separate things. Electron's performance is quite good and if your audience is "computer users at large", they won't care at all about the memory usage. I'd say you should almost definitely use it if you want to target Mac + Windows + Linux. Just know that you'll get wrecked on HN ;-)
- zozbot123 8y ago> if your audience is "computer users at large", they won't care at all about the memory usage I'm quite sure that you got that backwards. Your dev machine may run Electron apps fine with 16GB RAM, but a huge majority of average folks are on 4GB and often less. And they're already running Windows 10 (or at best OS X) and a web browser with a bunch of open tabs!
- Camto 8y agoTrue. My computer just cannot run a web browser and Atom at the same time without freezing for a few seconds every minute or so.
- jf- 8y agoThe performance really isn’t that bad at all in my experience. The complaints you see are developer complaints, where they’re talking about resource usage that ordinary users would never notice or question, or UI lag that most users wouldn’t care about (I only add this because someone else in this thread claims to have encountered it, but I never have, or have never noticed). If you find web apps running in chrome to be acceptably performant, then electron is fine for your use case. But naturally, a native solution will be faster if you’re doing something that really is resource intensive. VS Code is electron, I use VS Code every day without noticing any issues. I think the complaints about electron are moot.
- weiming 8y ago> where they’re talking about resource usage that ordinary users would never notice or question, or UI lag that most users wouldn’t care about But this is such poor logic. We can notice these things, while regular users just suffer not knowing why their battery drains so quickly, unable to pinpoint the problem.
- jf- 8y ago> But this is such poor logic. No, it’s not. It’s at most a trade-off. Some developers will doubtless make this their hill to die on, but I suspect it really has nothing to do with performance or battery life, and it’s likely motivated by resistance to web technologies being used on desktop vs what they’re used to. Also I’d like to see some actual battery life benchmarks for electron, because I don’t imagine that it’s a huge deal, but benchmarks would prove the matter. It also ignores actual desktop users or users who just use mains power all the time.
- spiralganglion 8y agoIf you’re on a Mac, open up activity monitor and watch which apps use the most energy. For me, the energy used by Atom, Slack, and Chrome is vastly higher than the energy used by other apps (inc. Safari loaded with tabs). It’s possible to make an energy efficient Electron app — you just need to aggressively shut off event loops when there’s nothing to update, which is hard so most app (and site) devs don’t bother. (I make complex animations on the web, so I’m hyper attuned to perf and energy use)
- yroc92 8y agoSlack, Spotify, VS Code, Insomnia and many other apps use it. They use excessive amounts of resources for what they are, but really any modern machine shouldn’t have a problem with it.
- fabiospampinato 8y agoI think Spotify is built using web technologies but not Electron per-se, unless they switched to Electron ~recently?
- yroc92 8y agoYeah not electron, but chromium, etc. I figured it’s a similar end result.
- jwr 8y agoThe performance complaints are mostly from developers. Users of your application, if it is important to them, will not care. The big thing about Electron which most developer discussions miss is that it enables low-cost multi-platform development, especially if you already have a web app. In this age when people would like to pay as close to 0 as possible for software, this is important. I have a SaaS app and people keep asking me about apps for iOS, Android and native Mac/Windows. There is no way I could afford to develop+maintain for even one of those platforms. Of course most people who ask about this would like to get the additional platforms for free :-) Electron makes it possible for me to re-package my app as a native one, with certain benefits (easier file uploads, access to printers and peripherals, etc), and with a reasonable cost.
- pseudalopex 8y agoLess advanced users complain when their computer is slow. Developers know how to locate the problem and that it could be fixed. Everyone here knows that Electron is the cheapest way to wrap a web app. It's obviously the fastest way for someone with web but not desktop experience to create a minimum viable desktop app. It isn't the only option for low-cost multi-platform development. You have good reasons for producing a hybrid app instead of a native app. It's questionable whether Slack does.
- kup0 8y agoI used to be an Electron hater, but I realize the problem is less Electron itself, and more has to do with how well it was used to develop the app. VSCode and Discord to me are notable exceptions, whereas most other Electron apps feel pretty sluggish. They must be doing something right that other devs using Electron are not. That said, I do still prefer the performance of native apps. Even though VSCode is fast for an Electron app, when I switch back to Sublime Text, I still realize the performance gap is there (especially for launch times, when I'm opening a bunch of small files at once)