4 ms·
It's because almost all electron apps are written fully in JS. In the context of the article, the UI is in HTML/JS and the business logic in Rust, thus the RAM
by z0mbie42 7y ago
It's because almost all electron apps are written fully in JS.
In the context of the article, the UI is in HTML/JS and the business logic in Rust, thus the RAM is not so high.
On the other hand, Qt QML embed it's own JS engine which is not resources light.
- ChickeNES 7y agoThe UI, especially since it's in HTML/JS, is almost certainly going to use more RAM than the business logic in most cases.
- kelnos 7y agoDid you come to this conclusion by taking measurements using real apps? Because if this is just your gut feeling, that doesn't make sense. The base memory footprint of something like Electron (just a simple Hello World app) is likely already heavier than a complete Rust-only GUI app. For a GUI app, business logic is usually not where your RAM budget goes.
- z0mbie42 7y agoElectron hello world ~40MB of RAM Qt with QML Hello World ~40MB of RAM Gtk-rs hello world ~20MB of RAM
- kelnos 7y agoNot sure where you're getting your numbers, but as a quick test I cloned an Electron Hello World app[0], bumped its Electron dependency to the latest version on npm, and ran it. It came in at around 90MB resident on the main process, with a GPU process of about 70MB, a "zygote" process of around 60MB, and a separate nodejs process around 35MB. Even if some memory was shared between those, that's still quite a bit more than 40MB. [0] https://github.com/greggman/electron-hello-world https://github.com/greggman/electron-hello-world