Memory usage increases with window size?
-
I've noticed that memory usage on Qt applications increases proportionally to the size of the window. For example, maximizing a window on a 4k screen increases memory usage by ~30Mb. I found a stackoverflow question on this same topic but it is dated for 2013 and I believe is outdated (https://stackoverflow.com/questions/14211976/qt5-memory-usage-depends-on-window-size).
The answers simply explains it away as a 'Qt thing' due to how Qt draws things, which is fair, however I noticed that other applications don't do this, even though they are graphically 'heavier'. I'm guessing they employ some newer tech that I'm unaware of (I'm using Qt 5.6 for clarification.)
What is the difference between Qt applications and other applications (notepad++, photoshop, game launchers, vs code, basically I haven't found another application that behaves like a Qt app) that causes this memory-expensive behavior? Bonus points if I could make it go away haha.
-
Hi,
The answer is likely the raster engine of the widgets module and the age of your Qt version.
You should consider updating to something more recent that has high DPI support to compare.
-
Hi,
The answer is likely the raster engine of the widgets module and the age of your Qt version.
You should consider updating to something more recent that has high DPI support to compare.
@SGaist said in Memory usage increases with window size?:
Hi,
The answer is likely the raster engine of the widgets module and the age of your Qt version.
You should consider updating to something more recent that has high DPI support to compare.
I can't, I need to compile with MSVC2010 and 5.6 is the latest version that supports it from what I've read.
-
Just tested it. I started my app with different window sizes on the same machine and did see memory use up with bigger display. Are you bothered by 30MB more memory use? It is not much.