5 ms·
I am genuinely curious, but why would you consider it not as important on a desktop to be fast or easily multi-threaded? Especially the latter is really puzzli
by royjacobs 10y ago
I am genuinely curious, but why would you consider it not as important on a desktop to be fast or easily multi-threaded?
Especially the latter is really puzzling to me.
- ulber 10y agoDesktop processors generally have much higher single threaded performance. Thus apps can more often afford to take a performance hit on desktop than on mobile.
- royjacobs 10y agoI think that's where we have a different opinion. The performance incurred by Electron applications is larger than I care to afford them, even on my speedy desktop.
- ulber 10y agoWell, the same actually largely holds for me. Low responsiveness is something I despise in applications. However, the general principle obviously stands: if you have more hardware performance you can be more inefficient and still have good responsiveness. Electron happens to cross the threshold for sensitive users like you and me, but for a large number of users it seems the step in performance from mobile to desktop is enough to buy you the "Electron/PhoneGap/Cordova abstraction" (seeing as how there are popular Electron apps but few for PhoneGap/Cordova).
- untog 10y agoI'm not saying that being fast doesn't matter on desktop, I'm saying it's a lot easier to be fast because desktop CPUs are faster. I'm not saying that an optimized experience doesn't matter, just that it's less important than it is on mobile.
- royjacobs 10y agoOk fair enough, I get what you're saying. My point is that tools like Electron are actually making it harder to do fast and multi-threaded code on desktop compared to other (native) options. So in that sense Electron's just as "bad" as PhoneGap on a mobile device: it actively hinders developers that want to build decently performing applications. This even happens with applications that are considered "toy" in this thread like Atom: Performance is really much worse than other editors like Sublime or TextMate.
- untog 10y ago> My point is that tools like Electron are actually making it harder to do fast and multi-threaded code on desktop Absolutely. Electron is worse than native, I'd never disagree with that. But I don't think people are looking at Electron and saying "hmm, shall we do Electron or native?", they're saying "oh great, Electron means we can make a capable cross-platform desktop app, something we don't have the time nor budget to do otherwise".
- royjacobs 10y agoThat's true. It's an enabler for some companies, which can only be applauded. I'm not sure I'm too happy with the "worse is better than nothing" mentality I guess, but that's a more general problem :)
- oceanswave 10y agoNothing precludes an Electron app from being multithreaded (though WebWorkers, child processes and more) or relying on native components to improve CPU intensive tasks. If someone is wanting to release a shitty application, they're going to do so irrespective of Electron availability.
- gshulegaard 10y agoI don't use Electron and haven't been following, but isn't Electron a UI only framework? What I mean is what is preventing you from writing a C/C++ library, installing it down with your Electron UI and having the Electron App call out to the high performance .so? PhoneGap gets a lot of hate because it's _slow_ and single threaded in an environment that is starved for resources. This can impact user experience even in _just_ a UI context. On a desktop, a single core is many times faster and there are much greater resources so I don't see it as having as large an impact on UI (if any at all noticeable user experience degredations). This is of course provided Electron is (or can be) UI _only_. Just curious :) since I have never really heard of Electron before this.
- wlesieutre 10y agoAnd this isn't just desktops. We're also talking about laptops, and Electron based software completely disregards battery life concerns. Chrome (technically not Electron but it includes all the same problems) and Spotify gobble down enough power that I make a point of not using them if I'm away from my power cord. Here I thought the gradual year-over-year percentage increases in battery technology were going to get us better battery life, but it turns out we'd rather just write shittier software.
- wishinghand 10y agoWhy does Chrome use up so much battery?
- oceanswave 10y agoIRT Battery life concerns - Electron utilizes OS based power management and will auto-sleep the app. What other battery life concerns do you have that are automatically solved by another framework?
- wlesieutre 10y agoI couldn't tell you precisely why Chrome has comparatively bad battery usage, but it does: http://blog.getbatterybox.com/which-browser-is-the-most-energy-efficient-chrome-vs-safari-vs-firefox/ http://blog.getbatterybox.com/which-browser-is-the-most-ener... Even if you just leave it sitting in the background with one tab open, Chrome uses more power than Safari. I'm currently measuring an "Energy Impact" of 1.9 vs 0.1 for that test. I don't have any hard data for Electron apps, but my experience is that they're worse than their native counterparts. For example, Spotify (playing offline files) vs iTunes.
- stefano 10y agoThe slower your application, the more battery it will consume to do the same task. A JS+HTML application will be slower than a C++ application that uses the OS's native UI toolkit, and therefore will consume more battery.
- jsight 10y agoWell, he is presuming that the increased performance of a typical desktop makes the performance difference smaller. Considering that Atom performs pretty well even on my five year old desktop, that seems like a reasonable assumption. Although I think this is discounting the fact that the performance difference between desktop and mobile platforms is shrinking every year. I agree with you with regards to multithreading, though. It seems like that is actually important on both the desktop and mobile for compute intensive tasks.
- oceanswave 10y agoThe red herring in the original comment is that Electron apps can't be multithreaded. They absolutely can be - through web workers, child processes and more. They can also fall back to calling native components for CPU intensive tasks. Just because Electron is used in a technology stack doesn't automatically mean that the developers are going to be lazy. Lazy devs be lazy, bro.
- tracker1 10y agoJust want to point out that the browser, and electron, and even node.js are multithreaded... it's only the JS engine itself that is a single thread. Asynchronous code and the UI engine itself definitely runs and interacts across threads. Also, there's also WebWorkers (while not great, can work in some cases). There are also native modules for Electron/Node which can work in background processes. In the end, for the most part, in most applications, there isn't much logic that actually takes advantage of multiple concurrent threads for logic, and I/O is already multi-threaded.