4 ms·
> The same is often true in the JavaScript world, which makes VSC interesting because it’s famously an outlier in the Electron world. That's because it's not a
by cxr 5y ago
> The same is often true in the JavaScript world, which makes VSC interesting because it’s famously an outlier in the Electron world.
That's because it's not a JS problem so much as it is a problem with the culture of NodeJS/NPM. It happens to be that NodeJS has pretty much cannibalized JS development, however.
Two large pieces of software that make heavy use of JS that most people don't even realize—because they don't feel like the kinds of apps that NPM programmers produce—are Firefox and the Gnome desktop. They're by no means examples of the top end of world's snappiest software, but they are solidly middle-of-the-road in a way that most Electron apps, for example, are not.
Dominant platforms that capture lots of developer attention (like NPM today, and Java starting 15–20 years ago) end up capturing the attention of the sort of programmers who are going to be causing trouble no matter what ecosystem they're working in.
- kaba0 5y agoI mean, both programs hardly use JS for anything other than scripting the behavior of a very optimized C/C++ codebase. So I don’t think it is fair to call them JS apps — I have never heard Firefox referred to as such.
- cxr 5y agoYour remarks here, esp. re "hardly use JS", make for a wildly misinformed comment. (You realize that every Electron app also has at the core a "very optimized[...] C++ codebase"? Aside from that, Gecko makes very little use of C and by now makes extensive use of Rust.) XUL-based apps were doing the Electron application architecture before Electron (or NPM, for that matter) even existed—and on average they've done it better. > I have never heard Firefox referred to as such. ... so? The fact that you aren't aware how heavily reliant that Firefox (and Thunderbird, and Zotero[1]) is on JS for its UI and other application logic doesn't exactly change anything. In fact, that most people aren't aware of it is rather the point of the comment that you're responding to... 1. https://news.ycombinator.com/item?id=29774097 https://news.ycombinator.com/item?id=29774097
- bayindirh 5y agoWhile Firefox's JS usage is more ingrained and near to its core, GNOME's and KDE's JS usage is nowhere as deep. They both use JS (and QML in KDE's case) as strict scripting engines, which directly bind to C++ codebase underneath. GNOME's JS introspection libraries are even "autogenerated" from the source and header files. I played with both, and the weight the JS parts are lifting are pretty minimal. All the stuff is done by the C++ parts underneath. It's like using TensorFlow, SciPy or a similar C backed library and telling that you use Python for computation. Same thing. At the end of the day, any Electron app I use (I use TiddlyDesktop for example) is using more RAM and CPU, and bogging down both considerably more w.r.t. Firefox, KDE or Eclipse. When a simple application which has a very optimized C++ core is using more resources to show a simple web page and manipulate it is using comparable resources to my IDE or primary browser, there's something very wrong.
- cxr 5y agoI've done more than play with Firefox and Mozilla toolkit code. "All the stuff is done by the C++ parts underneath" is an overstatement. (Not least of all because a bunch of stuff is now done by Rust parts and not C++ parts.) Plenty of the behind the scenes stuff is JS. > At the end of the day, any Electron app I use (I use TiddlyDesktop for example) is using more RAM and CPU, and bogging down both considerably more w.r.t. Firefox, KDE or Eclipse. When a simple application which has a very optimized C++ core is using more resources to show a simple web page and manipulate it is using comparable resources to my IDE or primary browser, there's something very wrong. These remarks doesn't really make any sense here. I didn't show up to the party defending Electron apps and their authors. My comment was an explicit indictment of typical NPM and Electron development practices.
- bayindirh 5y ago> I've done more than play with Firefox and Mozilla toolkit code. "All the stuff is done by the C++ parts underneath" is an overstatement. By both, I meant KDE & GNOME. I didn't dive into Mozilla/Firefox stuff, but as far as I understand, since setting enterprise stuff and locking features, etc. (I forgot the name of the enterprise stuff, it's long time ago) is done in JS, JS is more than skin deep in Mozilla/Firefox codebases. This is understandable though. Firefox is just Netscape, and they just invented JS. Not much involved otherwise. > These remarks doesn't really make any sense here. They're not direct counter-arguments to you. Just I've wanted to say that, even though the Electron is built on a C++ core, it's extremely inefficient and wastes a lot resources for what it does, that's it.