Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-51

Application::update function consumes time seemingly unnecessarily

    XMLWordPrintable

Details

    Description

      When running the attached example the device spends most of it's time in Application::update and requests consistently immediate updates.

      It appears that repaint function consumes as much time as possible until returning and the next update is immediate ~16ms after the previous update. Adding artificial delay between the update calls in main instead of immediately updating seems to reduce the time repaint function consumes without visually affecting the application frame rate and update will end up being called every 16ms regardless unless the delay is double digits (ms).

      Increasing the animation durations seem to alleviate this problem. If the animation duration is raised the updates will be periodically scheduled in the future as opposed to an immediate update. Changing the value of animationDurationScale property defined in the attached project to 5 and recompiling will demonstrate this effect.

      All in all mostly while the updates occur roughly every 16ms the time update consumes can vary quite a bit depending on external factors without affecting the visuals.

      Attachments

        1. 15ms_delay.cpp
          1 kB
        2. capture_15ms_delay.png
          capture_15ms_delay.png
          48 kB
        3. capture_wait_for_timestamp.png
          capture_wait_for_timestamp.png
          49 kB
        4. qtmcu51.zip
          1 kB
        5. wait_for_timestamp.cpp
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srodal Samuel Rødal
            miikapernu Miika Pernu
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes