News for hackers. Stuff that matters.
Re:Electron 6.0 by kgraves on Wednesday July 31, 2019 @06:10AM (#20572986)
The latter, I have a 3GB laptop. Almost any application I use that is electron makes my laptop scream for help (fan spinning furiously) and freezes it up.

I have to kill the application before it consumes everything.

Electron applications like VS Code are an exception and slightly gives me hope.

Re:Electron 6.0 by stevewodil on Wednesday July 31, 2019 @10:06AM (#20574507)
Does anyone know what makes VS Code an exception to this?

Going to be working on an Electron app, so I'm curious about what optimizations have been made there.

Re:Electron 6.0 by kitsunesoba on Wednesday July 31, 2019 @01:18PM (#20576282)
It’s likely just sheer difference in quality of engineering. For most companies that choose Electron, performance was never of any value in the first place and that’s reflected in the engineering regardless of how/what it’s written in. It just happens that bad code is much more egregiously bad with JS/Electron than with other stacks.
Re:Electron 6.0 by 52-6F-62 on Wednesday July 31, 2019 @10:48AM (#20574819)
I can't speak to VSCode, but I've been probably a hard use case for Electron development as I work in an industry without a ton of resources to throw at development, limited time, and less supportive environment for development (in spite of a pressing need to keep up).

I've found keeping as precious little of the work in the render process as possible has helped a great deal. Send everything to the main process and use the event/messaging system to update the state. Then things that you're used to doing to maintain application performance in a web browser apply. Keep the compute in the back as much as possible.

And depending on the task, offload compute to a native module [if you're capable and] if the expense between NodeJS <> native module is worth it (more intense compute tasks).

There's probably more and more experienced advice out there, but this is my experience so far.

Re:Electron 6.0 by jayjader on Wednesday July 31, 2019 @10:54AM (#20574853)
If I recall correctly, VS Code bundles its own Electron that Microsoft's team has spent considerable time & effort optimizing for it.
Re:Electron 6.0 by armandososa on Wednesday July 31, 2019 @12:07PM (#20575544)
Re:Electron 6.0 by mdgrech23 on Wednesday July 31, 2019 @11:07AM (#20574978)
Pretty sure they forked electron. Not sure what they did to it. Also they probably drop down to native for a lot of tasks.
Re:Electron 6.0 by Matthias247 on Wednesday July 31, 2019 @01:24PM (#20576345)
No. They are even contributing to upstream Electron - and they did this before Github was acquired by Microsoft.

They just run more efficient software on top of electron than others do.