Memory consumption of QWidget applications



  • It appears that on my system even the most basic GUI applications have a memory footprint between 40 and 50MB. I'm linking to QtCore and QtGui but not doing any extra work and get around 46MB from an application that just sits there. That's really hefty!

    Is this to be expected? Would static linking (code is open source) lower this considerably?



  • I don't know much about the specifics, but I do know that for* quite a heavy-loaded application using Qt 5.3* I had memory consumption of about 40 MB - with a clean application it should be at around 20 MB. But I have to note that I am compiling Qt myself, to get rid of many of the dependencies (DirectX-, OpenGL-libraries and the other huge dlls that come with LibreOffice, too, for example...I forgot their name). Static linking, however, didn't help when I last used it (it was still Qt 4 back then).

    Since you're thinking about statically linking you would have to self-compile, anyway - take a look at the configure-switches, it may help lower memory consumption.



  • Thanks for the information thEClaw! Looks like your figure isn't too far off from mine. I'll investiage further and try a static build as well. I could swear that when tinkering with one of the prior Qt5 versions, I was getting <10MB for the small text editor tutorial that came with QtCreator; like 7MB or so?

    Threads like "this":http://qt-project.org/forums/viewthread/33095 make me weep. How could things have gotten so bad so quickly?



  • Don't forget that with a static build the licensing terms change a little (I think you have to either go open source or buy a commercial license, at least if you want to distribute your program).

    And thanks for the link, I will invest some time and see if I can bring down memory consumption/dll size for my applications as well. Qt has undeniably gotten "fat" over time, I especially dislike the huge amount of dynamic libraries you have to ship along your executable.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.