Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using Electron, you are rendering each window in Chrome, with some added OS hooks. With Proton, you are using JavaScriptCore with hooks to the native MacOS UIs and APIs.

Seems to me that this should use far fewer resources (especially memory) and make it easier to make an App look more 'MacOS'y. Very eager to give it a go!



Anything that reduces the number of running chrome instances on my poor little laptop would be nice.


I tried out the example "Notepad" app in the git repo and it ran at 70MB. Is that good? I don't have any metrics about how much memory a hello world Electron app uses.


Well just for comparison, I have Notepad++ running right now with 4 medium-sized files open in it, and memory usage is still comfortably under 5 megs.


Well, that seems a bit too much. For comparison, take a look at this example electron app that I wrote to basically check if you're online using IPC.

https://i.imgur.com/g94LOvE.png

It uses around 35MB.


70MB is too much for mainly native application.

For the comparison, IDE sketch (editor with syntax highlighting) from Sciter (HTML/CSS/script engine) SDK (https://github.com/c-smile/sciter-sdk/tree/master/samples/id...) takes 43 MB.

Screenshot: https://sciter.com/wp-content/uploads/2018/05/idea-ide.png


Fresh instance of Kate on my desktop uses 27MB, albeit its way more than a dumb text editor. Still, twice native is still in the same order of magnitude, something most naive electron apps fail to accomplish.


Another thread quoted 300MB baseline


Chrome is like the elephant that comes and sits on my laptop. Would be unusable without the great suspender.


I just declared Chrome bankruptcy and switched to Firefox a few weeks ago. CPU rarely goes over 10% on my 2017 MBP. With Chrome it was almost always above 50%.


I swapped when the new FF came out. Was sick of chrome using 3–4gb of memory and bringing my computer to a grinding vault. 3 times the number of tabs in Firefox and I have 0 issues. I recommend FF now.


I used Firefox for a couple of years for the same reason, but the new release broke my keyboard shortcuts and VimFx plugin. Now I use opera and cVim, it's even better. Much faster to start than chrome, shortcuts work, syncing works, vim works, developer tools are great, no bloated background services and square tabs!


I faced the same problem with new FF. Although not as great as Vim-Fx, saka-key does solve the problem to some extent.


Tridactyl works fine in FF. (Vim add-on)


I got a recent Great Suspender update that blew away my settings for the plugin. Did this happen to you too? It made me sad.


Yeah that got me too. Small price, although, i'm tempted to switch to firefox after reading comments here.


How have I never heard of this!? Thank you!


How do you use JavaScriptCore with proton? It runs on node which uses v8.

Resource measurements: The sample "Notepad" app (just a text box in a window, no copy/paste, etc.) uses 79 MB. For comparison the same app built using Xcode uses 27 MB, and TextEdit uses 40 MB.


On Windows 10, Notepad uses 2 MB and Wordpad 12 MB. I'm quite surprised that the latter can fit a full, Ribbon equiped word processor in so little memory.

Not that I'd be concerned about a few tens of MB nowadays but on the whole we're consuming computing resources at the same rate faster hardware is put out (Gates' law).

I have a Pentium 3 running NT4 sitting on the same desk and it is faster at many tasks than my i5 workstation. Visual Studio 6 especially is super snappy. How then can Slack, on a machine with an order of magnitude more processing power and 64 times (!) as much RAM lag when switching channels?


I recently experienced Visual Studio 6 in a Win2k VM, and it was sickening how fast it was compared to modern tools. Same with Office2k apps, and all using an order of magnitude less memory. There has to be a better way than the path we are on, software-wise.


It's ridiculous. I can launch a VM running Linux + X11 desktop environment from scratch faster than one of the most popular Electron apps launches & connects. Probably would run few apps in the VM well too with the same amount of memory.

Anything that could fix the current situation even a little bit like this project is much appreciated imho.


It starts by avoiding touching anything Electron related.

This craziness just made me buy Sublime Text.


Well, we started prioritizing code cleanliness over everything else and throwing away good tooling because it was old. Blocking performance optimizations because they're "unmaintainable," or just not thinking about resource usage, is going to result in bad software.

I'd bet Slack, for example, has all sorts of abstraction and indirection layers in it, making it impossible to figure out the fastest way to do the job.


Visual Studio Code is pretty light and extremely responsive for me on 2012 hardware


Hence why so many enterprise installs are still proudly running Office 2010.

I do wonder why nobody takes a stab at creating a bonafide Excel clone that looks modern and runs fast (and, no, LibreOffice isn’t good enough).


Because writing an Excel clone which is "good enough" is really, really hard work, takes a really long time and you probably won't get away with "Let's do 80% in version 1 and then optimize" - People expect Excel. Not Excel lite. Especially if they have to pay for it.


I’m not saying it’s easy, but in an age of so much disruption it’s honestly amazing how Excel continues to dominate. And I say this as someone who spends most of my waking hours in Excel...


LibreOffice was written using an overachitected component system; it is very slow. Just writing something without the layers of abstraction would be refreshing.


My mistake, it is indeed Node not JavaScriptCore, I posted a correction.


I'd love to see electron "suddenly" start reducing memory footprint as soon as a competitor starts gaining market share


Actually, earlier today Electron 2.0.0 dropped and includes an `affinity` option, which throws everything under one process. Supposed to help with memory/resource usage.


Wow, nice! Didn't think there was much room to improve given the dependency on Chrome.


According to [the PR that introduced this to Electron](https://github.com/electron/electron/pull/11501), it just takes advantage of a similar feature in Chromium.


I think it'll be hard because they depend on Chromium for performance, which is practically out of their hands and the project is already very streamlined for what it's doing. But Electron comes with a different set of tools i.e. you have the full browser API and renderer at your disposal.


Yeah, but before we say anything we should look the the performance and memory benchmarks.


Absolutely, though I can't think of a good reason why it couldn't be leagues better in performance. I'll post here with some numbers later in the day if no one beats me to it.


Correction: it's using Node, not JavaScriptCore. (I think that makes it even more useful, and it should still be far more performant)


ReactNative runs the js in plain V8 that in turn calls native apis. Native code is never generated from js at compile or runtime.


I've never heard of JavaScriptCore. I assumed that ReactNative transpiled JS to the native languages/APIs and that this would too.


The only part that's translated to native APIs is the rendering itself. Instead of rendering a WebView with an HTML <button />, it renders a UIButton from the native UIKit.

The app logic is still in Javascript, never compiled to another language.

IMHO this is perfectly fine. I have a fairly large app in react-native, and most users that have tried it are fine with its performance. Scrolling in lists and maps, being native components, is as snappy as in a real native app. I'm only having performance issues in page transitions, and I think I can fix that with a bit more work.


Isn't it running on Node?


Thanks for pointing that out, I commented with a correction.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: