Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED] Qt5 qmake performance issue - 8 times slower than Qt4 qmake
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt5 qmake performance issue - 8 times slower than Qt4 qmake

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 5 Posters 6.3k 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.
  • U Offline
    U Offline
    Uwe Kindler
    wrote on last edited by
    #1

    Hi,

    we ported a large Qt project from Qt4 to Qt5 and noticed, that Qt5 qmake is ca. 8 times slower that Qt4 qmake.
    The attached QtCreator output shows the two qmake runs for the same project. The Qt4 qmake run needs 26 seconds but the Qt5 qmake needs 3 minutes and 18 seconds. That is ca. 8 times slower.

    The Qt5 qmake is the qmake.exe that ships with the Qt 5.0.2 MinGW installation. The Qt4 qmake has been build with the exact same compiler - so this is not related to compiler. So is this a kind of performance issue or is Qt5 qmake more sophisitcated and needs more time because it checks and does more things? If no one knows a good reason, I would file a bug report in Qt bugtracker.

    The complete output is available here: "http://pastebin.com/ysH2B1RU":http://pastebin.com/ysH2B1RU

    @Qt4 qmake run

    07:49:47: Führe Schritte für Projekt qtlabb aus...
    07:49:47: Starte "c:\codingxp\qt\qt\bin\qmake.exe" C:\CodingXP\cetoni_repository\usl\env\qt\qtlabb\qtlabb.pro -r -spec win32-g++ "CONFIG+=declarative_debug"
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/common/common.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_4_8_4-Debug/common]
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/3rdparty/3rdparty.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_4_8_4-Debug/3rdparty]
    ...
    07:50:13: Der Prozess "c:\codingxp\qt\qt\bin\qmake.exe" wurde normal beendet.
    07:50:13: Verstrichene Zeit: 00:26.

    Qt5 qmake run

    07:52:00: Führe Schritte für Projekt qtlabb aus...
    07:52:00: Starte "C:\CodingXP\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe" C:\CodingXP\cetoni_repository\usl\env\qt\qtlabb\qtlabb.pro -r -spec win32-g++ "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/common/common.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/common]
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/3rdparty/3rdparty.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/3rdparty]
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/widgets/widgets.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/widgets]
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/itemviews/itemviews.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/itemviews]
    Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/hid/hid.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/hid]
    ...
    07:55:18: Der Prozess "C:\CodingXP\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe" wurde normal beendet.
    07:55:18: Verstrichene Zeit: 03:18.@

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

      Seems like a good candidate for a bug report. You can also ping Qt devs on development ML or IRC.

      (Z(:^

      1 Reply Last reply
      0
      • L Offline
        L Offline
        luxner
        wrote on last edited by
        #3

        Hi Uwe,

        I'm facing the same problem here. qmake4 runs very fast. qmake5 takes much, much longer.

        Have you found a solution for that issue?

        Mathias

        1 Reply Last reply
        0
        • U Offline
          U Offline
          Uwe Kindler
          wrote on last edited by
          #4

          Hi Mathias,

          no, I have not found a solution yet. Now that I know that I'm not the only one with this problem, I created a bug report:

          "https://bugreports.qt-project.org/browse/QTBUG-37252":https://bugreports.qt-project.org/browse/QTBUG-37252

          Please vote for this bug and add a comment that you have the same problem. Can you tell me something about your system and virus scanner? My system:

          Windows 7 64 Bit
          Qt5.2.1 with MinGW
          Virus scanner: AVG AntiVirus Business Edition

          1 Reply Last reply
          0
          • U Offline
            U Offline
            Uwe Kindler
            wrote on last edited by
            #5

            According to the solution provided in this "bug report":https://bugreports.qt-project.org/browse/QTBUG-37252 adding CONFIG-=depend_includepath to the project will decrease processing time.

            Here are the measurements I did for qmake invocation:

            with CONFIG+=depend_includepath:
            qmake4: 02:17
            qmake5: 05:34

            with CONFIG-=depend_includepath:
            qmake4: 00:32
            qmake5: 00:56

            So qmake5 is only 2 times slower than qmake4 and not 8-10 times slower.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              luxner
              wrote on last edited by
              #6

              in the meanwhile I also found out that calling qmake with the "-nodepend" option decreases processing time. I think that's the same option as you mention.
              Without this option qmake opens all the header files and scans those files for their includes, so it basically opens all the header files which are involved in the project (that also means thirdparty includes). That was the reason for the slow performance.
              It seems that in qmake4 "-nodepend" was the default!?

              1 Reply Last reply
              0
              • Bruce.ZhangB Offline
                Bruce.ZhangB Offline
                Bruce.Zhang
                wrote on last edited by
                #7

                Any new updates?
                I had also face this problem.

                SGaistS 1 Reply Last reply
                0
                • Bruce.ZhangB Bruce.Zhang

                  Any new updates?
                  I had also face this problem.

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Bruce-Zhang did you follow the trick @luxner mentions in its last post ?

                  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