Hacker News new | ask | show | jobs
by pwdisswordfishy 134 days ago
Those apps are not consuming 300MB of RAM because they are written in JS. JS is running on microcontrollers and the James Webb Space Telescope.

They are consuming 300MB of RAM because they are built on Electron and the NPM ecosystem.

2 comments

Wait a second, JS in James Webb Space Telescope?? Doing what? I'd love to hear about its usecases in the telescope. Is there any blog post about it?
There is a pretty significant difference between the way JS is used there and in electron apps.

This might be what you were getting to but I tend to agree with the idea of place all the interaction logic in a high kevel language and get the performance where it's needed.

Electron does not do that and neither does the people developing electron apps most of the time. I doubt many people throwing electron apps together chose to do that so they can put their CPU intensive code in C/C++/Rust/swift, they want to erite everything in JS.

What should happen is the bare minimum needs to be in JS and the rest in an efficient compiled language.

I mean even the browser does that, the DOM API hands off to lower level libraries for multimedia etc.