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. running the executable from terminal is slower than running it from qt creator

running the executable from terminal is slower than running it from qt creator

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 340 Views
  • 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.
  • A Offline
    A Offline
    ABID
    wrote on last edited by
    #1

    Hello all,

    this is my first question.
    I'm developping an application using opencv, dlib and qt in c++. when i run the code from qt creator i get a result of 15FPS. however, when i run the executable from terminal i only get 8FPS. I noticed that in both modes i'm using the same amount of ressources.
    I would like you to help me find the source of the problem.

    thank you in advance.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ABID
      wrote on last edited by
      #5

      i tried to track the problem by running each section of the app alone. it seems like the issue came from the face detection model "res10_300x300_ssd_iter_140000.caffemodel". All i hade to do is change the input size of the model and the executable runs with the same fps as running from qt creator (except that its slower now since i changed the input size lol).
      What can be the origin of this strange behavior ?

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

        Hi and welcome to devnet,

        Are you sure the same set of libraries are loaded between Qt Creator and the terminal ?
        Maybe some environmental variable that are not the same ?

        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
        • A Offline
          A Offline
          ABID
          wrote on last edited by
          #3

          yes I'm pretty sure the same set of libraries are loaded. for the environmental variables I'm not really sure.
          I don't know if this is going to help or not but i tried to run the code on a docker container in the same machine from qt creator and i get the same results as the terminal.
          where can i check the environmental variables for the executable?
          thank you in advance.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tink
            wrote on last edited by Tink
            #4

            https://doc.qt.io/qt-6/qprocessenvironment.html#systemEnvironment
            https://doc.qt.io/qtcreator/creator-project-settings-environment.html

            1 Reply Last reply
            0
            • A Offline
              A Offline
              ABID
              wrote on last edited by
              #5

              i tried to track the problem by running each section of the app alone. it seems like the issue came from the face detection model "res10_300x300_ssd_iter_140000.caffemodel". All i hade to do is change the input size of the model and the executable runs with the same fps as running from qt creator (except that its slower now since i changed the input size lol).
              What can be the origin of this strange behavior ?

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

                As I suggested, check the librairies that are loaded when running on the command line.

                You can also use a software line heaptrack to get some insight about what is happening within your application.

                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

                • Login

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