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. Pinpointing bottlenecks in UI thread

Pinpointing bottlenecks in UI thread

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 441 Views 2 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.
  • ozcanayO Offline
    ozcanayO Offline
    ozcanay
    wrote on last edited by
    #1

    I am observing that my UI is rather slow. I tried to offload as much work as possible off of the UI thread. Even though I got improvement, I still feel like it could be faster. Maybe I should profile the code. What is your strategy in this situation? Which tools/profilers are you using? I want to know which functions/code blocks incur overhead.

    JonBJ 1 Reply Last reply
    0
    • ozcanayO ozcanay

      I am observing that my UI is rather slow. I tried to offload as much work as possible off of the UI thread. Even though I got improvement, I still feel like it could be faster. Maybe I should profile the code. What is your strategy in this situation? Which tools/profilers are you using? I want to know which functions/code blocks incur overhead.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @ozcanay said in Pinpointing bottlenecks in UI thread:

      Which tools/profilers are you using?

      You won't get much pertinent answers if you don't say what platform you are interested in developing on!

      Speaking for Linux, unfortunately I have to report they they, and Qt Creator, want you to use the Linux perf tool. While it may be very powerful, I was an experienced user with the older gprof and that worked fine and was easy to understand. IMHO perf is a nightmare to attempt to understand, not to mention to install and get working at the OS level. I think you need a degree in "perf-understanding" to get anywhere with it :( If you are Windows and using MSVC/Visual Studio you may be more successful with their inbuilt profiler.

      A year or so ago I asked this community which profiling tools they used to analyse their Qt programs' performance, and was surprised/disappointed to be met by a deafening silence. The "community" seemed not to use performance analysis tools. I was as horrified as you might be! So good luck.....

      I gave up on profiling and put in relevant QElapsedTimers around high-level bits, then moved them down to lower-level bits till I had a general idea of where time was being spent. Not ideal --- like using print/debug statements instead of stepping through a debugger --- but better than nothing.

      1 Reply Last reply
      1
      • ozcanayO Offline
        ozcanayO Offline
        ozcanay
        wrote on last edited by
        #3

        I am on Linux. To be honest, I had looked in perf and it really was not easy to grasp for me, too. Did not look into gprof.

        JonBJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          KDAB's Hotspot might help you with the use and analysis of perf.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • ozcanayO ozcanay

            I am on Linux. To be honest, I had looked in perf and it really was not easy to grasp for me, too. Did not look into gprof.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @ozcanay
            @SGaist's suggestions are always worth looking into! I had a quick glance, it includes this picture
            alt text

            This is what I mean about you need a degree to decipher what perf is telling you! I don't have (much of) a clue what this is all about...!

            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