Live data from Hacker News

Electron is Harmful

medium.com

11–20 of 37 posts

Re: Electron is Harmful

#11

As someone who doesn't particularly like Electron, I have an honest question: Why all the hate? Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes, it makes it easier to "just use your web developers" instead of hiring native app devs, but how many of those apps would even exist if the only path was to develop a native app? Electron is too slow for me, so I just stick to e.g. Emacs an…

One issue is that Electron apps don’t get browser security patches until Electron updates Chromium, the developer updates Electron, and the user updates the app.

Re: Electron is Harmful

#12
Software development is primarily an engineering discipline, so cost and time to ship must be weighted along with performance. (a classic example of a trade-off) There's no point in making things more performant than required. (Except perhaps from an enthusiast/hobbist/academic/curiosity perspective)

If we can ship apps on Windows, Mac and Linux with a near native experience, a fraction of the cost and benefiting from readily available professionals with web skills, that's fantastic.

Don't get me wrong, there are several classes of tasks where performance is a requirement. For these, Electron is indeed not a great choice. However, it's usually possible to combine it with a more suitable technology to get the desired results. For instance: VSCode uses ripgrep, a command line tool written in Rust to provide the fastest possible search experience.

> even the simplest elements like the native menu bar is not available.

Not entirely sure what you mean by that, VSCode has a completely normal menu bar on both Windows and Mac, and context menus are also native. (At least on OS X; on Windows it's hard to know what "native" even means for context menus since UWP apps and Win32 apps have completely different styles for them)

By the way, if there's a market for more efficient competitors to electron apps, these will flourish and electron apps will "lose", but that doesn't seem to be the trend.

Re: Electron is Harmful

#13
> "Well, it works fine on my machine, and I only have 32 gigabytes of ram."

Tangentially, this problem is not limited to Electron. Developers should regularly test (and why not also build) their software on an old laptop with 2GiB of RAM.

I don't get why I have to bump the maximum heap size of Gradle daemons to 2 or 3 GiB just so they don't barf under their own GC vomit. Building an in-memory representation of your project's modules and dependencies (even hundreds thereof) should not take more than a few MiB if done correctly.

Re: Electron is Harmful

#14

As someone who doesn't particularly like Electron, I have an honest question: Why all the hate? Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes, it makes it easier to "just use your web developers" instead of hiring native app devs, but how many of those apps would even exist if the only path was to develop a native app? Electron is too slow for me, so I just stick to e.g. Emacs an…

One issue is that Electron apps don’t get browser security patches until Electron updates Chromium, the developer updates Electron, and the user updates the app.

While that's true, electron apps very rarely provide unrestricted web browsing of untrusted content. They're usually locked to a single domain, or load their entire interface from local files.

Re: Electron is Harmful

#15
post #6

As someone who doesn't particularly like Electron, I have an honest question: Why all the hate? Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes, it makes it easier to "just use your web developers" instead of hiring native app devs, but how many of those apps would even exist if the only path was to develop a native app? Electron is too slow for me, so I just stick to e.g. Emacs an…

>Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes. Is impossed on the users by the developers using it.

You can just use an alternative. If the company you work for is mandating that you use specific tools, that's a different issue, orthogonal to electron.

Re: Electron is Harmful

#16

Articles complaining about electron pop up at least once every month. One thing I always see missing from them is a better idea. The reason electron is prevalent in businesses nowadays is because it's easy to develop and deliver to customers. Apparently this comes with the price of performance loss. Please, the next time you feel the need to use your time to write an article about how electron is "cancer", try spendi…

Xamarin?

Re: Electron is Harmful

#17

Articles complaining about electron pop up at least once every month. One thing I always see missing from them is a better idea. The reason electron is prevalent in businesses nowadays is because it's easy to develop and deliver to customers. Apparently this comes with the price of performance loss. Please, the next time you feel the need to use your time to write an article about how electron is "cancer", try spendi…

Xamarin?

Looks like a possible solution, I've never heard of it before. Thanks for the suggestion. :)

Re: Electron is Harmful

#18
post #6

As someone who doesn't particularly like Electron, I have an honest question: Why all the hate? Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes, it makes it easier to "just use your web developers" instead of hiring native app devs, but how many of those apps would even exist if the only path was to develop a native app? Electron is too slow for me, so I just stick to e.g. Emacs an…

>Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes. Is impossed on the users by the developers using it.

>Yes. Is impossed on the users by the developers using it.

No more than chocolate is "imposed" on people consuming it by the chocolate manufacturers.

Re: Electron is Harmful

#19

Earlier quoted context omitted.

One issue is that Electron apps don’t get browser security patches until Electron updates Chromium, the developer updates Electron, and the user updates the app.

While that's true, electron apps very rarely provide unrestricted web browsing of untrusted content. They're usually locked to a single domain, or load their entire interface from local files.

This doesn't make it safe -- consider a lower level library inside Chromium can be exploited when processing input data. Your chat app can be exploited by receiving a crafted image. This actually happened in image processing library and network library in Chromium.

Re: Electron is Harmful

#20

As someone who doesn't particularly like Electron, I have an honest question: Why all the hate? Sure, it's slower and less resource-efficient, but is anyone making you use it? Yes, it makes it easier to "just use your web developers" instead of hiring native app devs, but how many of those apps would even exist if the only path was to develop a native app? Electron is too slow for me, so I just stick to e.g. Emacs an…

> Why all the hate? Because it's simply offensive to me as a computer scientist and software engineer to use most of the resources of a 3GHz processor and 12GB of RAM doing something that really can be easily done with a processor 1000x slower with 1000x less RAM. I'm willing to accept a certain amount of overhead for modern user interfaces and cross-platform capability, but three orders of magnitude wastage is ridic…

Perhaps you're being hyperbolic, but can you give an example of an application that runs more or less the same functionality and performance on a 30 MHz processor with 12MB RAM (a high end computer from the early 1990s) as a 3GHz processor with 12GB of RAM (a high end computer from 2017)?
Post reply on HN