Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. When minimized ~2% of CPU used, when not minimized ~8% of CPU used

When minimized ~2% of CPU used, when not minimized ~8% of CPU used

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 807 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DeeeZ
    wrote on last edited by
    #1

    Hi,

    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 ?

    More strange:
    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:

    1. 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.
    2. 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 ...

    Thx.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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/).

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved