News for hackers. Stuff that matters.
Re:Electron 4.0.0 by jf- on Friday December 21, 2018 @11:22AM (#18734292)
The 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.

Re:Electron 4.0.0 by weiming on Friday December 21, 2018 @11:38AM (#18734416)
> 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.

Re:Electron 4.0.0 by jf- on Friday December 21, 2018 @11:45AM (#18734493)
> 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.

Re:Electron 4.0.0 by spiralganglion on Friday December 21, 2018 @12:34PM (#18734846)
If 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)
Re:Electron 4.0.0 by sroussey on Friday December 21, 2018 @03:21PM (#18736279)
That and check if the window is hidden, which was improved a bit in this release.
Re:Electron 4.0.0 by ryacko on Friday December 21, 2018 @01:06PM (#18735149)
I’m curious, do you compile anything to asm.js?
Re:Electron 4.0.0 by spiralganglion on Friday December 21, 2018 @07:11PM (#18737923)
Not yet, though I'm keeping my eye on WASM and will pursue it if the need arises. The sort of work I do has relatively little overhead from the JS, and is mostly bottlenecked by rendering (SVG, mostly). WASM wouldn't help my load/parse times since I rarely ship more than a few Kb of JS, and it wouldn't help my per-frame times or latency because I'm usually done the JS part of the frame in around 1ms.
Re:Electron 4.0.0 by oscargrouch on Friday December 21, 2018 @01:11PM (#18735197)
Take a look at the apps you are executing now.

Now imagine if they were all electron based and therefore consuming 1GB+ each?

Also we need to take into account that it feels slugish and they are not as responsive as other apps, and i guess it has to do with JS VM reaching the tipping point of what it can do and optmize..

Anyway, my main point is that the big problem will happen when you stack those things.. than a computer that should be more than enough, just isn't.

Even the user with low tech awareness, will close the app and feel his computer is working better.. and they will blame the company who makes the app for making their computers feel slugish in the end.

Re:Electron 4.0.0 by jf- on Friday December 21, 2018 @01:18PM (#18735266)
Except that they don’t need to consume 1gb+ and they don’t need to feel sluggish. We’re also not talking about replacing every native app with electron.
Re:Electron 4.0.0 by oscargrouch on Friday December 21, 2018 @02:10PM (#18735696)
> Except that they don’t need to consume 1gb+ and they don’t need to feel sluggish.

The problem is that is built around V8 tied up to Node.js, so i cant see how it will get any better giving V8 is a state-of-the-art VM already very optimized and using little resources as possible. Also you are tied to blink/webkit which together with V8 will consume a good chunk of memory and you as a dev will be unable to optimize further, giving you can use anything other than JS and blink.

> We’re also not talking about replacing every native app with electron.

Of course not. But the problem here is the trend. Companies will see how cheap it is to just reuse cheaper human resources being used to the company web dev, and how fast you can prototype an app.

The other companies who create better products because they care more, will have a hard time competing with the cheap sketchy software that cost less to build, and the worse products will likely win.

Its "the worse is better" all over again.

Re:Electron 4.0.0 by jf- on Friday December 21, 2018 @02:51PM (#18736015)
> The other companies who create better products because they care more, will have a hard time competing with the cheap sketchy software that cost less to build, and the worse products will likely win.

They’re not cheap sketchy products, you keep mischaracterising electron apps so that you have a point.

Let the market decide. If the native apps are superior, then customers will choose them more often and companies will feel the pressure to use them. Unless of course customers don’t care, as I believe, then any argument about their superiority is meaningless.

Re:Electron 4.0.0 by na85 on Friday December 21, 2018 @03:33PM (#18736369)
It's not a free market, though because right now there isn't really a direct competitor to e.g. Slack, because the trade-off of developer convenience vs performance seems to be working in Electron's favour in that nobody else has brought a native competitor to "market".
Re:Electron 4.0.0 by oscargrouch on Friday December 21, 2018 @05:02PM (#18737088)
> They’re not cheap sketchy products, you keep mischaracterising electron apps so that you have a point.

I still have a point even if/when the electron based ones have more quality or are better from the consumer point of view, because my point was not about the final quality of the finished product, but about scale and economics. Im not saying that every electron app will be inferior, this is illogical and unsustainable..

Rather im arguing that the whole model that the Electron represents will flood our desktops and even phone with cheap, memory hog apps, even when some of than are great, collectively they will be a nightmare to our computers. Users will blame the OS, or they will figure it out when they close the Electron apps, seeing their computers working better (And i guess when they get to this they will blame the company that created the product, and the bad word might start to spread).

Even with all the computational power we have now, we will have a even worse user experience than we had in the 90's with very limited computers compared to nowadays.

> Let the market decide. If the native apps are superior, then customers will choose them more often and companies will feel the pressure to use them.

My point being in the end, you wont have any options, and in some cases great products might vanish.

Im very critical of all things Apple, but this is one of the things i think Steve Jobs got right, and no wonder Mac OS and now iPhone worked out as a shield for great products that would not survive in the "worse is better" environment of Windows and the Web.

They are also great, accessible, popular, etc.. But if they were the only game in town a lot of great products would not have survived and others would not have been created. Thats what i fear about if the Electron trend gets too much hyped.. We will move fast and break a lot of great things in between.

If it gets popular, but not the monopolistic kind of popular, then its great, and good that its there as an option. But in tech we use to jump from hype to hype. (And you also can see what im trying to elucidate here by following whats happening in the NoSQL vs SQL database front)

Re:Electron 4.0.0 by jf- on Friday December 21, 2018 @05:53PM (#18737428)
No one is hyping electron Oscar, quite the opposite: HN is ceaselessly negative about it, and for very thin reasons that just don't cut it for me.

I think you do get close to the real reason for this negativity when you say that you're afraid of it - I suspect that electron is threatening to many developers exactly because it has so much potential. It dramatically lowers the bar for access to desktop development, works on all platforms, and if it really catches on (and this is probably worst of all) it renders much of their native development experience useless.

The criticisms that it doesn't automatically look and behave natively and that it is more resource intensive are true, but I don't think they really matter. Developers here seem to be deliberately overstating the case against it in an attempt to make it go away.

Anyway, the argument doesn't matter all that much either. Electron is such a good value proposition from a development standpoint that it'll continue to see growth, and with it further optimisation, and eventually it or a web tech orientated successor will end up being pretty big.