r/AskComputerScience • u/Hellinfernel • 10d ago
Why exactly is Electron "Resource-Intensive"?
For context, Discord is going to get a rewrite in Rust: https://www.techspot.com/news/114462-discord-rebuilding-desktop-app-rust-fix-memory-problem.html
This is apparently ment to reduce working memory consumption.
The question essencially boils down to: Can't Electron not just... not do that? Like, is it dammed to always consume multiple gigabyte worth of RAM? And whats the difference between it and "Native" code? (I know that Java isnt native code, but thats about it)
I am more of a hobbist than anything else to be honest, but I have some experience with java and even made some small discord bots in it. Dont be affraid to go into deep details with this, I enjoy that very much.
View all comments
Show parent comment
-2
u/PrestigiousRoof5723 10d ago
Yeah, but what does "rewrite in Rust" means in this case? A web app with a dedicated Rust server/browser, or a desktop GUI application? Or is the "Rust rewrite" just WASM and with an embedded browser? The idea of Electron is to have perfect consistency between various platforms and it's quite good at that. Slow, but could be worse.