7 ms·
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
by roberttod 8y ago
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!
- _bxg1 8y agoI've never heard of JavaScriptCore. I assumed that ReactNative transpiled JS to the native languages/APIs and that this would too.
- ikurei 8y agoThe 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.
- sydd 8y agoYeah, but before we say anything we should look the the performance and memory benchmarks.
- roberttod 8y agoAbsolutely, 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.
- ben_jones 8y agoI'd love to see electron "suddenly" start reducing memory footprint as soon as a competitor starts gaining market share
- roberttod 8y agoI 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.
- Klonoar 8y agoActually, 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.
- roberttod 8y agoWow, nice! Didn't think there was much room to improve given the dependency on Chrome.
- jakelazaroff 8y agoAccording to [the PR that introduced this to Electron](https://github.com/electron/electron/pull/11501 https://github.com/electron/electron/pull/11501), it just takes advantage of a similar feature in Chromium.
- inamberclad 8y agoAnything that reduces the number of running chrome instances on my poor little laptop would be nice.
- nautilus12 8y agoChrome is like the elephant that comes and sits on my laptop. Would be unusable without the great suspender.
- techbubble 8y agoI 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%.
- philliphaydon 8y agoI 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.
- deleted 8y ago[deleted]
- jgalentine007 8y agoI 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!
- sbmthakur 8y agoI faced the same problem with new FF. Although not as great as Vim-Fx, saka-key does solve the problem to some extent.
- crashride 8y agoIsn't it running on Node?
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- roberttod 8y agoThanks for pointing that out, I commented with a correction.
- ridiculous_fish 8y agoHow 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.
- sjmulder 8y agoOn 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?
- richard_todd 8y agoI 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.
- smt88 8y agoVisual Studio Code is pretty light and extremely responsive for me on 2012 hardware
- AHTERIX5000 8y agoIt'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.
- roberttod 8y agoCorrection: it's using Node, not JavaScriptCore. (I think that makes it even more useful, and it should still be far more performant)
- pennaMan 8y agoReactNative runs the js in plain V8 that in turn calls native apis. Native code is never generated from js at compile or runtime.