Live data from Hacker News

Electron is flash for the desktop (2016)

josephg.com

301–310 of 1001 posts

Re: Electron is flash for the desktop (2016)

#301
post #18

A lot of Slack's high (background) CPU usage is caused by GIFs, in my experience. Just did a quick check on my quadcore MBP, having Slack fullscreen out-of-view with nothing animated in view gives it a CPU usage of 0,1% with spikes up to 2,5%. Switch to a conversation with a single animated party parrot emoji, go to another fullscreen app once again, and CPU usage never drops below a whopping 22%. For an animated par…

Note that you need to multiply your percentages by cpu core number.

not on macOS, Linux, BSD etc. That only applies to Windows.

Re: Electron is flash for the desktop (2016)

#303
There is competition, for example between Slack's electron app and their website, or between Sublime, Atom, and VS Code. It seems like the author of this post doesn't trust users to choose memory usage and battery life over other things.

I expect that's correct - they are sometimes less important to users than other things. Emacs is tiny now, but at one time it was considered a memory hog and people kept using it.

Re: Electron is flash for the desktop (2016)

#304

Earlier quoted context omitted.

> Nobody cared about writing Desktop apps before Electron came along, there's basically zero money in it I would acutally pay Spotify extra money if they brought back the old, snappy, pre-Electron version of their Windows desktop app. They replaced it with something that is simply too heavy to manage larger playlists (except maybe on the max-spec MBPs it's being coded on) just because they could iterate more quickly…

Seconded for the Mac app. The current experience is shameful .

The Spotify app is not built on Electron - it's built on CEF and always has been, author was wrong.

Re: Electron is flash for the desktop (2016)

#305

Earlier quoted context omitted.

It's moot if you're an established company with deep pockets moving slowly. If you're starting from scratch with limited funds, it is definitely not a moot point. Would Slack have been as wildly successful if they had to implement native apps on all 3 platforms + iOS + Android + etc? I'd have a hard time believing so.

No, and that's fine. I don't think anyone is going to begrudge a small team the power of developing a 'desktop' application using cross-platform tools like that. It's great that the barrier to developing an application in that way is lowered. But that doesn't excuse the abuse of that platform. Spotify used to have a pretty convincing native Mac app, which was spiked in favour of their current abomination, and I've wa…

Electron is great for user experience. Compare to something like JetBrains' IDEs which are written in Java and are much less native feeling than Atom (and just as resource-hungry).

Re: Electron is flash for the desktop (2016)

#307

Earlier quoted context omitted.

Can't say I agree. Native apps are often garbage. Discord is another Electron app that I think is actually quite a bit better in most dimensions (attractiveness, functionality, speed) than the native apps it replaces (Mumble, Teamspeak, Skype, etc.).

But is that due to technology choices, or due to more attention being paid to UX? (and I do believe webapps give more flexiblity in that regard) I get the feeling that UX and UI designers for web- and mobile apps are just a different breed than their native desktop equivalents. It might just be my Windows bias though, iirc Windows didn't have a strong / great UX guideline until their current one came around - and I h…

That is due to the technologies available on the web being easily more suitable for GUI development than older native tools or desktop frameworks. We're in a similar boat, we made WPF apps. Now we're bringing it to the web and Electron. The things you can do now in React, heck i wouldn't even know where to begin in WPF or QT. If you look at modern Electron apps like Atom, VSCode, Discord and so on, the things they do and how flexible they are, this would mean so much hardship and pain in older solutions to the point where it's probably not viable any longer.

Re: Electron is flash for the desktop (2016)

#308
post #232

Earlier quoted context omitted.

Have you been trained as an engineer, in a country where "engineer" is a very specific thing and is held to higher expectations, including the possibility of having your title taken away by your peers if you do not respect your duty to, first and foremost, your users and/or society, like every country that takes the title of engineer seriously? If yes, what in earth makes you think writing Electron apps is a good ide…

> Have you been trained as an engineer, in a country where "engineer" is a very specific thing and is held to higher expectations, including the possibility of having your title taken away by your peers if you do not respect your duty to, first and foremost, your users and/or society, like every country that takes the title of engineer seriously? No country trains software engineers in the way you describe.

I think Germany was the country described in the post. Whether it's true to the fullest extent is hard to say, but having worked and socialized with them for years it seems mostly true. Engineering is the country's actual official religion. And I mean that as the highest compliment.

(No offense to any other country's engineers -- the engineer mindset is the same everywhere, but the mindset of the non-engineer in other countries is the distinction. That is, Germany grants engineers a degree of respect, almost reverence, that I've never seen in the US.)

Re: Electron is flash for the desktop (2016)

#309

People complaining about electron are the same type than the ones that used to say : - why are people writing this stuff in C. It's so slow and you don't have as much control on memory. Write it in Assembly. - why are people writing this stuff in Java. It's so slow and you don't have as much control on memory. Write it in C. - why are people writing this stuff in Python. It's so slow and you don't have as much contro…

That's always been the trade-off: high-level development environments with a great developer experience and a pleasure to deploy to users... at the expense of premature pessimization. In all my years managing applications built for mobile (whether phones, tablets, or laptops) any time someone says, "let's use webviews," you know there are going to be performance issues down the road. You'll get to market quickly but you're going to spend that development effort down the road closing the gap and trying to tame a vastly complex VM to make your users happy again.

I'm hoping react-native like dev experiences will make us re-think how we can have our cake and eat it too.

Re: Electron is flash for the desktop (2016)

#310
Saying that "React and friends" are the good thing you want (without Chrome) is kind of nuts. React is insanely bloated for what it is, and it's also highly dependent on the bloated browser (and especially Chrome). React Native is an intermediary layer between a work in progress VM and JavaScript. So, we can't win there.

In a sense what we really want is for the browser to be an OS-level feature so that the browser-based-app is low cost, as is the case with chrome OS and you could argue was Microsoft's vision with IE. This is doable today if you write cross-browser code and wrap your web app in a platform-native web view, but then you lose the conveniences of Electron (cross-platform APIs to solve common problems such as menus) AND you have to deal with browser incompatibilities. All this to save RAM and 5% Of one CPU core.

Perhaps in an ideal world we'd have a lightweight VM with nice JavaScript APIs. The immediate problem we run into is that really fundamental UI gadgets, such as styled text fields and canvases, are not implemented similarly on the platforms we care about (Windows, Mac, Gnome, Android say), so we have to reinvent that wheel and before you know it you have another bloated virtual machine, except this one isn't battle tested and it only exists three years in the future.

Post reply on HN