When minimized ~2% of CPU used, when not minimized ~8% of CPU used
The application is running on Win 7 using Qt 5.2.1 / QtQuick 2
We just discovered that our application is using ~8% CPU to display the main window. And wihtout any user interaction ... When this main window is minimized the CPU is then only ~2% of CPU.
What could be the cause ?
This application using OpenGL Qt environment has a memoy leak about ~20ko per seconds. (and on some PC there is no memory leak ... 2 on 8 PC - the 2 PC have exaclty the same hardware/software)
Using ANGLE environment, there is no memory leak whatever the PC used for the moment (5 for the moment)
For my point of view, I suppose this:
- A loop of signal / slots(between Cpp part and QML part) ask to update the display forever even if the end user, we see nothing new.
- The memory leak comes from the loop in the display's update and a OpenGL driver buggy.
Does this sound realistic ?
Has someone another idea ?
How to find signals / slots involved in this display loop ? Without to go through each of them and a log ouput ...
For the memory leak: since it is only leaking on some machines, I would think the OpenGL driver is likely to get the blame.
For CPU usage: it might be that the difference you see comes from painting vs. not painting the window. When a window is minimized, it does not need to be painted, so the graphics stack can skip doing some of it's tasks, resulting in lower CPU usage. But some Qt versions are known to have some performance regressions (especially in QApplication class). so the reason might be different. Or, of course, it can be your bug :-P
I suggest testing again using Qt 5.3, or Qt 5.3.1 (snapshot available "here":http://download.qt-project.org/snapshots/qt/5.3/5.3.1/2014-05-23_96/).