Live data from Hacker News

Electron is flash for the desktop (2016)

josephg.com

61–70 of 1001 posts

Re: Electron is flash for the desktop (2016)

#62
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…

Post author here. I thought about that, but there weren't any visible animations playing when I took those measurements. And the 5% figure survived a restart of the client. Its possible there were gifs playing above-the-fold somewhere and reloading themselves, but if so I'd say thats a bug somewhere in the interaction between the 15-20M lines of code in slack, electron and chrome.

Its also worth noting that blog post is from a few months ago. Its possible the slack team has fixed the issue now. I wouldn't know because I deleted the slack desktop app and haven't looked back.

Re: Electron is flash for the desktop (2016)

#63
post #24

In most cases it's either an Electron app or no desktop app at all. It's simply not feasible to write native apps.

Then don't, it's really wasteful to have webdevs write desktop apps using Electron. I don't see a gain over using a webpage. I use slack this way and I don't see any problems.

No one would bother writing Electron app if there was no demand. Most users, (even tech savvy users) prefer using Electron Slack instead of keeping the webapp open in a browser.

Re: Electron is flash for the desktop (2016)

#64

FWIW, we're working on https://github.com/nidium/Nidium presicely to fix this. A new kind of browser engine, not based on any existing engine, allowing developers to use a subset of the web (webgl, 2d, layout) without being forced to use a bloated ecosystem (and which also works on mobile and low end device). Previous HN discussion : https://news.ycombinator.com/item?id=6314961

Both your webpage and your docs are riddled with typos and the like. While it isn't indicative of code or project quality, it sure makes taking the project seriously a lot harder.

Re: Electron is flash for the desktop (2016)

#65
I don't get this article. What does the author propose instead? Cross-platform is tough to get right and it places much burden on developers focusing on application logic for his niche.

I don't think it's fair to label Electron as Flash just because it's doing things in the background that Chromium authorizes. We know that Chrome Browser and it's underlying technology is in use everywhere and anyone can open it up and take a peek or embed Chromium in their C++ projects.

On top of that Electron takes care of cross-platform issues, and it's performance is under constant iteration by Google, so you have a much better chance of getting to market without having to do the plumbing work.

While I share the concern that Electron seems to spin up fan on my Macbook, it's quite rare that I don't think much about it.

If anything, Electron improves desktop user experience by leveraging web technology. I shudder to think what Slack will look like if it was done with Java Swing. But in some HN'ers mind, that is the "right" way of building this world. I see a big split in thinking amongst the demographic well marinated by Java Is Everywhere (TM) vs Javascript is Everywhere.

Re: Electron is flash for the desktop (2016)

#66
post #25

Meanwhile, we're still waiting for those "pro-native" people to give us better user experience. I agree that Electron has its issue like having multiple copies of Chromium (and not Google Chrome). Obviously native apps are better overall, but only if they provide a better UX. Being a vscode user, I don't know which native editor provides the same UX.

There are native editors reaching from very bare bones (vim) to medium like VS Code (Sublime) to full IDE (Visual Studio). All of those run native interfaces.

Sublime is a hybrid. It has its own renderer that doesn't use Cocoa on macOS, for example, and I believe its input fields aren't native, either.

"Native" should mean that it uses native UI widgets offered by the platform itself, which hardly any editor does.

Re: Electron is flash for the desktop (2016)

#68
While I love Node.js and its environment, I totally agree with this post. I don't have the Slack client installed for this reason and only use Electron when I write code. React Native seems like a nice middle ground: Javascript, but compiled to native.

PS, I notice that the author is using Ghost for the blog, so I am guessing the author is in the same line (like Node.js but not Electron).

Re: Electron is flash for the desktop (2016)

#69

> If you want to use JS and react to make a native app, try react native instead. Given the discussion of the recent ReactXP thread, I'm guessing most people don't realize you can do this today . React Native supports macOS [1] and UWP [2]. Edit: There's even some early work on Ubuntu support [3]. [1] https://github.com/ptmt/react-native-macos [2] https://github.com/Microsoft/react-native-windows [3] https://github.c…

I'm probably in that camp too, I thought it was just for android and iOS still (even though I consider myself to keep up to date with these types of things). Do you know if they have anything for linux yet?

There's some early work for Ubuntu here [1].

You can also currently use React to share code across iOS [2], Android [3], UWP [4], macOS [5], web [6], VR [7] and a bunch of other stuff that is there mostly for fun (like React Hardware [8] and React Sketch.app [9]).

There's also experimental work on defining a set of primitives that works across all of these platforms [10].

[1] https://github.com/CanonicalLtd/react-native/blob/ubuntu/REA...

[2] https://github.com/facebook/react-native

[3] https://github.com/facebook/react-native

[4] https://github.com/Microsoft/react-native-windows

[5] https://github.com/ptmt/react-native-macos

[6] https://github.com/necolas/react-native-web

[7] https://github.com/facebook/react-vr

[8] https://github.com/iamdustan/react-hardware

[9] https://www.npmjs.com/package/react-sketchapp

[10] https://github.com/lelandrichardson/react-primitives

Re: Electron is flash for the desktop (2016)

#70
post #45

Earlier quoted context omitted.

Qt exists and is really nice to work with. It has multiple language bindings. How is it unfeasible?

Development time needed to create desktop apps (for Windows, Mac and Linux) given that there's already an existing webapp: - using Electron: 1 month - using QT: 2 years

Chrome apps would have solved one of the main problems if they were still a thing (does anyone know why chrome deprecated them?).

(by reusing the chrome context, your memory usage wouldn't grow unnecessarily for each new slack/spotify/whatever you open).

Post reply on HN