News for hackers. Stuff that matters.
Re:Why I Still Use Vim by apatters on Thursday January 04, 2018 @03:39AM (#16068827)
People can mount whatever defense they like of Electron, but the bottom line is, I think twice before I adopt any new Electron app. My daily drivers are a desktop replacement with 8gb of ram and an ultra-portable machine with 4gb.

On 4gb it only takes a couple of Electron apps to eat half of my ram or more. Factor in the OS and a browser or two and it's already swapping. These are often just chat apps or something, they may be good apps but they aren't doing anything fundamentally new and whatever they replaced probably needed <100mb of ram.

It used to be that developers published minimum and recommended system requirements for their program. Maybe Electron developers need to start disclosing that 4gb ram is the minimum to use their apps and 8gb is recommended.

There don't seem to be many benefits I get from an Electron app that I couldn't be getting by just running Chrome in app mode with a dedicated profile (which consumes a lot less ram).

I would prefer to see developers release a web app first and then perhaps offer an Electron version if you've got ram to burn.

Re:Why I Still Use Vim by owaislone on Thursday January 04, 2018 @03:49AM (#16068862)
I think Electron devs really need to step and try to address the performance problems but even if they do, I don't think it'll help much since they have to allow full web platform to run. Electron has brought so many apps to Linux that devs otherwise wouldn't even consider so I'm happy about that. On the other hand these apps have major performance problems. Especially the ones that I've to leave running in the background.

I think a better platform could be a highly stripped down version of web to the point where it is not even web anymore but still familiar and simple to use. Kind of like what Flutter did (Desktop support in flutter would be pretty great actually). Either that or a serious react native platform/framework that focused on Desktop computers.

Re:Why I Still Use Vim by stuaxo on Thursday January 04, 2018 @05:26AM (#16069230)
It seems unlikely - electron developers are going to understand how to use browsers, but fixing the browser itself is the way to make it use less RAM.

Maybe if they switch to Servo it might use a little less RAM, but inherently it's always going to be pretty heavy.

Re:Why I Still Use Vim by tjpnz on Thursday January 04, 2018 @06:47AM (#16069625)
> electron developers are going to understand how to use browsers, but fixing the browser itself is the way to make it use less RAM.

This to me is the crux of the issue. Github has a lot of great engineers but they're less likely to be versed in C/C++/whatever else is required to make this kind of thing truly succeed.

It really begs the question of what Microsoft were thinking the day they decided to build Code on it.

Re:Why I Still Use Vim by giancarlostoro on Thursday January 04, 2018 @07:15AM (#16069759)
Microsoft is thinking of portability as a primary. Also VS Code is a way better experience than Atom after having given Atom many chances. Microsoft wants to build tools anyone can use to enhance usage of their cloud platform offerings from any OS.
Re:Why I Still Use Vim by jsmeaton on Thursday January 04, 2018 @07:42AM (#16069900)
They’d already built a web based editor for cloud dev and ported it to electron as a desktop app afaik. They didn’t set out to make an electron editor.
Re:Why I Still Use Vim by owaislone on Thursday January 04, 2018 @06:35AM (#16069556)
I don't think servo will help much in the long run. It's just that web is too complex a platform with tons of APIs, technologies and edge cases to support. Any full fledged web engine will always be heavy. I think Electron (or something that wants to displace it) should give up on support web platform on Desktop, pick a limited subset of it and run with it. Yes, we won't have the ability to bundle web apps as desktop apps anymore but that's exactly what will fix the mess. We don't need a way to turn a website/webapp into a desktop app. We need a way to make it very easy to port a webapp to a desktop app will little effort. The key is to make the knowledge transferable, not the actual code as is.
Re:Why I Still Use Vim by oliwarner on Thursday January 04, 2018 @05:02AM (#16069143)
I think the most frustrating thing here is it doesn't need to be this bad.

Rendering HTML and running a JS VM might seem like a long way around to get a desktop interface, but you're reading this in just that context, alongside a couple of dozen tabs, many running webapps with complexities to rival Microsoft Word '97. You're not using 4GB per tab; you probably aren't even getting up to 4GB with all your tabs.

Electron can do better.

Re:Why I Still Use Vim by roryisok on Thursday January 04, 2018 @06:07AM (#16069405)
> Electron can do better

Think of electron as a single tab open in a browser instance. If you open 12 tabs in chrome, it doesn't use 12x the RAM, because most of the initial RAM is used maintaining the browser instance, not the rendered tab. most electron apps don't have "tabs" but if they did they wouldn't multiply the memory usage either

Re:Why I Still Use Vim by oliwarner on Thursday January 04, 2018 @10:00AM (#16070719)
While I understand your shared-memory argument, Electron in this example, is using twice what Firefox is using for 3 webapps and another dozen tabs.
Re:Why I Still Use Vim by roryisok on Thursday January 04, 2018 @10:17AM (#16070892)
Three Web apps and 12 tabs might not be the equivalent of that one app in Electron, if it's a heavy one. If a Chrome browser instance running Slack uses less RAM than the Slack Electron app does, __then__ we can say Electron uses more RAM than it should.

I'm not saying it does or doesn't, and I'm not defending it, I just think we need to be a little more fair with our comparisons

I did a comparison a while back (though I'd hardly call it scientific). I built a basic "hello world" Electron app, which consumed 69MB of RAM on Windows 10. When I opened the html file of that app in Chrome it took 82MB.

Re:Why I Still Use Vim by znpy on Thursday January 04, 2018 @04:26AM (#16069008)
As far as I've seen, most electron-based applications do not share the electron runtime, but bundle everything they need into the installer. So yeah, we all are basically holding two or more copies of slightly different version of the electron runtime.
Re:Why I Still Use Vim by raverbashing on Thursday January 04, 2018 @04:06AM (#16068923)
I wonder if we'll see a Mozilla engine based Electron (or simply not the latest Chromium engine, which gets bigger and slower with every passing day)
Re:Why I Still Use Vim by roryisok on Thursday January 04, 2018 @06:08AM (#16069415)
Check out qbrt, a gecko app runtime by a mozilla engineer

https://github.com/mozilla/qbrt

I really hope it sees more development

Re:Why I Still Use Vim by dblohm7 on Thursday January 04, 2018 @05:35AM (#16069266)
We had a project going called Positron but I think it was mothballed.
Re:Why I Still Use Vim by hobofan on Thursday January 04, 2018 @04:12AM (#16068949)
Re:Why I Still Use Vim by saas_co_de on Thursday January 04, 2018 @07:37AM (#16069874)
> the latest Chromium engine, which gets bigger and slower with every passing day

what?!?

Re:Why I Still Use Vim by kevingadd on Thursday January 04, 2018 @06:51AM (#16069649)
xulrunner was effectively that a long time ago, and many apps shipped using it, but it got shot in the head. There are a couple apps still out there using forks of it, I think.
Re:Why I Still Use Vim by IronBacon on Thursday January 04, 2018 @07:27AM (#16069824)
One is TomTom's Home Route Planner, I'm pretty sure it's based on Xulrunner, I need it to update my car's navigator system. Unfortunately it works only on Windos and Mac...
Re:Why I Still Use Vim by pvdebbe on Thursday January 04, 2018 @05:45AM (#16069307)
As a developer I see tremendous value in Electron and how fast you are able to get prototypes up and running. I am also highly relieved that my desktop software doesn't have to run in the background like a chat application or an editor does. I can get away with Electron, by my standards which are similar to yours, because I run my software "in focused mode" only and close it when I'm done. (Image gallery / gallery editorial)