6 ms·
I just made hello world window in qt. It's 28 kB. edit: typo
by mrwoggle 6y ago
I just made hello world window in qt. It's 28 kB.
edit: typo
- jart 6y ago28kb? You're only seeing the tip of the iceberg. I just built Qt Hello World myself. It's about sixty megabytes in size. jart@debian:~/scratch/qtproject$ qmake -project jart@debian:~/scratch/qtproject$ make jart@debian:~/scratch/qtproject$ ldd ./qtproject | grep -Po '(?<==> )[^ ]*' | xargs ls -alH | awk '{x += $5} END {print x / (1024 * 1024.)}' 59.5916 That's bigger than I expected to be honest.
- jcelerier 6y agoAren't you also listing all the non Qt libs here ? X11, libinput, pulse audio, dbus, gstreamer, OpenSSL... e.g. here on linux for a static build of Qt (which links against both X11 and wayland platform plug-ins, and uses an embedded libpng, harfbuzz, freetype, etc...) a QWidget hello world comes out at 14 megabytes.
- makapuf 6y agoId say its fair game if building hello world links those gstreamer and openssl.
- jcelerier 6y ago> Id say its fair game if building hello world links those gstreamer and openssl. why ? it entirely depends on how your linux distro chose to build Qt, not on Qt itself.
- EvilEy3 6y agoBecause application can't run without those libraries. It's like comparing Java application without taking JVM into account.
- jcelerier 6y ago> It's like comparing Java application without taking JVM into account. no, it's not. The "equivalent" of the JVM would be the libQt5{Core,Gui,Widgets...}.so ; but here we are talking about the operating-system-provided libraries, so it is like comparing with a Java application, with the JVM, and also for instance all the MS Windows system libraries, or all the macOS frameworks like CoreFoundation, etc etc.
- makapuf 6y agoOK, so in this context the app is X MB. If all distros link those libs with libre cote and ui, for all intents and purposes, it takes X MB. If some dont, then lets discuss it (but if you can link to gstreamer and openssl to build a hello world, the issue is not entirely on the distro shoulders)
- fabiospampinato 6y agoThe thing is nobody actually uses hello world programs, by the time you build a real application the difference in RAM usage between that and a good Electron app for example blurs significantly.
- inetknght 6y agoI disagree. I remember using lots of GUI apps within a 96MB budget 25 years ago -- even browsers. Electron does not provide that much more desired features than apps from 25 years ago.
- fabiospampinato 6y agoYou can make a very decent Electron app with roughly (roughly = ~2x or less) that amount of RAM too if written well, for that you get pretty much a codebase that you can use everywhere, which on it's own is _massive_.
- ficklepickle 6y agoI've noticed Signal Desktop only uses 100mb. That is quite good for an electron app. A simple server-side node process will use at minimum ~20mb, which obviously does not include a browser. It's open source, I've been meaning to poke around and see what they are doing differently.
- fabiospampinato 6y agoThere's no secret really, just don't import junk dependencies like most people do and spend some time inspecting your memory usage every now and then, with very little effort you'll probably cut down on your memory usage significantly by doing that. With a lot more effort often you can probably even make something faster than uses less memory than a supposedly native app (if they spent less time than you optimizing it).
- tuxychandru 6y agoSignal desktop runs as multiple processes. Did you add up all their memory consumption? On my Debian laptop, Signal processes consume about 700 MB of RSS in total, immediately after starting.
- korijn 6y agoNodeGui (which is used here) is also running on Qt.