News for hackers. Stuff that matters.
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @03:10PM (#16980201)
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!

Re:Proton Native – React Native for the desktop by inamberclad on Wednesday May 02, 2018 @04:10PM (#16980731)
Anything that reduces the number of running chrome instances on my poor little laptop would be nice.
Re:Proton Native – React Native for the desktop by robrtsql on Wednesday May 02, 2018 @04:56PM (#16981094)
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.
Re:Proton Native – React Native for the desktop by babypuncher on Wednesday May 02, 2018 @06:27PM (#16981710)
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.
Re:Proton Native – React Native for the desktop by DecayingOrganic on Wednesday May 02, 2018 @05:07PM (#16981168)
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.

Re:Proton Native – React Native for the desktop by c-smile on Wednesday May 02, 2018 @08:55PM (#16982465)
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

Re:Proton Native – React Native for the desktop by zanny on Wednesday May 02, 2018 @05:39PM (#16981383)
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.
Re:Proton Native – React Native for the desktop by foota on Wednesday May 02, 2018 @05:05PM (#16981151)
Another thread quoted 300MB baseline
Re:Proton Native – React Native for the desktop by nautilus12 on Wednesday May 02, 2018 @04:18PM (#16980792)
Chrome is like the elephant that comes and sits on my laptop. Would be unusable without the great suspender.
Re:Proton Native – React Native for the desktop by techbubble on Wednesday May 02, 2018 @07:34PM (#16982083)
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%.
Re:Proton Native – React Native for the desktop by philliphaydon on Wednesday May 02, 2018 @09:41PM (#16982701)
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.
Re:Proton Native – React Native for the desktop by jgalentine007 on Thursday May 03, 2018 @12:38AM (#16983385)
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!
Re:Proton Native – React Native for the desktop by sbmthakur on Thursday May 03, 2018 @06:42AM (#16984734)
I faced the same problem with new FF. Although not as great as Vim-Fx, saka-key does solve the problem to some extent.
Re:Proton Native – React Native for the desktop by rawland on Friday May 04, 2018 @08:00PM (#16999393)
Tridactyl works fine in FF. (Vim add-on)
Re:Proton Native – React Native for the desktop by unphased on Wednesday May 02, 2018 @04:53PM (#16981068)
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.
Re:Proton Native – React Native for the desktop by nautilus12 on Friday May 04, 2018 @06:00PM (#16998752)
Yeah that got me too. Small price, although, i'm tempted to switch to firefox after reading comments here.
Re:Proton Native – React Native for the desktop by kingosticks on Wednesday May 02, 2018 @06:09PM (#16981587)
How have I never heard of this!? Thank you!
Re:Proton Native – React Native for the desktop by ridiculous_fish on Wednesday May 02, 2018 @05:16PM (#16981226)
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.

Re:Proton Native – React Native for the desktop by sjmulder on Wednesday May 02, 2018 @06:42PM (#16981795)
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?

Re:Proton Native – React Native for the desktop by richard_todd on Wednesday May 02, 2018 @06:52PM (#16981865)
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.
Re:Proton Native – React Native for the desktop by AHTERIX5000 on Wednesday May 02, 2018 @09:28PM (#16982649)
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.

Re:Proton Native – React Native for the desktop by pjmlp on Thursday May 03, 2018 @12:53AM (#16983441)
It starts by avoiding touching anything Electron related.

This craziness just made me buy Sublime Text.

Re:Proton Native – React Native for the desktop by mighty_bander on Thursday May 03, 2018 @06:41AM (#16984728)
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.

Re:Proton Native – React Native for the desktop by smt88 on Wednesday May 02, 2018 @08:00PM (#16982208)
Visual Studio Code is pretty light and extremely responsive for me on 2012 hardware
Re:Proton Native – React Native for the desktop by airstrike on Wednesday May 02, 2018 @10:14PM (#16982861)
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).

Re:Proton Native – React Native for the desktop by sgift on Thursday May 03, 2018 @07:55AM (#16985099)
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.
Re:Proton Native – React Native for the desktop by airstrike on Friday May 04, 2018 @01:41PM (#16996513)
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...
Re:Proton Native – React Native for the desktop by tluyben2 on Thursday May 03, 2018 @06:15AM (#16984642)
LibreOffice was written using an overachitected component system; it is very slow. Just writing something without the layers of abstraction would be refreshing.
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @06:44PM (#16981813)
My mistake, it is indeed Node not JavaScriptCore, I posted a correction.
Re:Proton Native – React Native for the desktop by ben_jones on Wednesday May 02, 2018 @04:04PM (#16980668)
I'd love to see electron "suddenly" start reducing memory footprint as soon as a competitor starts gaining market share
Re:Proton Native – React Native for the desktop by Klonoar on Wednesday May 02, 2018 @04:43PM (#16980975)
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.
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @05:06PM (#16981159)
Wow, nice! Didn't think there was much room to improve given the dependency on Chrome.
Re:Proton Native – React Native for the desktop by jakelazaroff on Wednesday May 02, 2018 @06:03PM (#16981548)
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.
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @04:25PM (#16980842)
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.
Re:Proton Native – React Native for the desktop by sydd on Wednesday May 02, 2018 @03:46PM (#16980505)
Yeah, but before we say anything we should look the the performance and memory benchmarks.
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @03:54PM (#16980592)
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.
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @06:32PM (#16981732)
Correction: it's using Node, not JavaScriptCore. (I think that makes it even more useful, and it should still be far more performant)
Re:Proton Native – React Native for the desktop by pennaMan on Thursday May 03, 2018 @02:58AM (#16983888)
ReactNative runs the js in plain V8 that in turn calls native apis. Native code is never generated from js at compile or runtime.
Re:Proton Native – React Native for the desktop by _bxg1 on Wednesday May 02, 2018 @10:33PM (#16982941)
I've never heard of JavaScriptCore. I assumed that ReactNative transpiled JS to the native languages/APIs and that this would too.
Re:Proton Native – React Native for the desktop by ikurei on Thursday May 03, 2018 @05:07AM (#16984419)
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.

Re:Proton Native – React Native for the desktop by crashride on Wednesday May 02, 2018 @04:45PM (#16980996)
Isn't it running on Node?
Re:Proton Native – React Native for the desktop by roberttod on Wednesday May 02, 2018 @06:33PM (#16981739)
Thanks for pointing that out, I commented with a correction.