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. Does QDebug affect performance?
Qt 6.11 is out! See what's new in the release blog

Does QDebug affect performance?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qdebugdebugprintstdcout
3 Posts 2 Posters 214 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.
  • Joe von HabsburgJ Offline
    Joe von HabsburgJ Offline
    Joe von Habsburg
    wrote on last edited by
    #1

    I wonder, I print every array when come to me. That is about some information about it. When I stop receive debug is continue.

    qDebug() << "FRAME ID : " << frameId << " - RECEIVED : " << _received << " - START INDEX : " << startIndex << " - LAST INDEX : " << startIndex + count << " - INDEX DIFF LAST FRAME :  " << startIndex - index_check << " - COUNT : " << count << " - SIZE : " << size << " - FIRST :" << list[0] << " - LAST :" << list[count - 1];
    

    Every frame id has nearly 200 array, and I can take unlimited frameid (yes is limited in uint32 but it is restarting when it is max, you know) so, does it affect performance lost ?

    JonBJ 1 Reply Last reply
    0
    • Joe von HabsburgJ Joe von Habsburg

      I wonder, I print every array when come to me. That is about some information about it. When I stop receive debug is continue.

      qDebug() << "FRAME ID : " << frameId << " - RECEIVED : " << _received << " - START INDEX : " << startIndex << " - LAST INDEX : " << startIndex + count << " - INDEX DIFF LAST FRAME :  " << startIndex - index_check << " - COUNT : " << count << " - SIZE : " << size << " - FIRST :" << list[0] << " - LAST :" << list[count - 1];
      

      Every frame id has nearly 200 array, and I can take unlimited frameid (yes is limited in uint32 but it is restarting when it is max, you know) so, does it affect performance lost ?

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

      @Joe-von-Habsburg
      Yes outputting anything affects performance to some degree. Whether it matters depends how often you call it and how much it has to print. From Creator I have seen qDebug() information continuing to come out e.g. even after program has exited, so I presume Creator does some buffering of some kind which may affect performance (possibly for the better).

      Whatever "nearly 200 array" might mean, try not to print the content of many/large arrays if speed is of the essence.

      1 Reply Last reply
      3
      • Joe von HabsburgJ Offline
        Joe von HabsburgJ Offline
        Joe von Habsburg
        wrote on last edited by
        #3

        Thank you for your reply

        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