4 ms·
I've not learned Rust yet, but unless it does behave really weird, I can't believe that Electron and Qt have roughly same RAM usage. In my experience Electron h
by Hitton 7y ago
I've not learned Rust yet, but unless it does behave really weird, I can't believe that Electron and Qt have roughly same RAM usage. In my experience Electron has usually 2 to 3 times higher RAM requirements than Qt application of similar scope.
- hacker_9 7y agoQT these days is written in a JavaScript-esqe language and runs a modified WebKit to power the UI. It's as bad as it sounds.
- adev_ 7y ago> QT these days is written in a JavaScript-esqe language and runs a modified WebKit to power the UI. It's as bad as it sounds. That's wrong. QML has two mode: one "interpreted" ( the javascript-esque) and one that can be compiled to native C++ without js. And WebKit / webview itself is a plugin for Qt, it is absolutely not required.
- jcelerier 7y ago> QT these days is written in a JavaScript-esqe language and runs a modified WebKit to power the UI. ... that is entirely false. Qt has its own scene graph renderer which has nothing to do with WebKit.
- z0mbie42 7y agoIt'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