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. Projekt compile time with Qt 6 much slower than Qt 5

Projekt compile time with Qt 6 much slower than Qt 5

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 7 Posters 1.3k Views 3 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.
  • Christian EhrlicherC Offline
    Christian EhrlicherC Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Please test you Qt5 compile time with c++17 enabled. This should make a big difference.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    JonBJ 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher

      Please test you Qt5 compile time with c++17 enabled. This should make a big difference.

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

      @Christian-Ehrlicher So C++17 compilation could be substantially slower than older versions? Sad... :(

      Christian EhrlicherC 1 Reply Last reply
      0
      • Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by Andy314
        #4

        Cannot really understand what you mean. Make Qt 5 compiling as slow as Qt 6 compiling :-)
        I have integrated this line in the pro - file, but nothing changed in both compile times:
        CONFIG += C++17

        I forgot, I use a 12 core CPU with hyperthreading -> 24 threads !

        M 1 Reply Last reply
        0
        • Andy314A Andy314

          Cannot really understand what you mean. Make Qt 5 compiling as slow as Qt 6 compiling :-)
          I have integrated this line in the pro - file, but nothing changed in both compile times:
          CONFIG += C++17

          I forgot, I use a 12 core CPU with hyperthreading -> 24 threads !

          M Offline
          M Offline
          mpergand
          wrote on last edited by mpergand
          #5

          @Andy314
          maybe it's worth verifying if multi threads compilation is actived.
          It should be something like -j4 in the command line.

          [EDIT] you add that after my post:

          I forgot, I use a 12 core CPU with hyperthreading -> 24 threads !

          Yeah, make sense ;)

          1 Reply Last reply
          0
          • Andy314A Offline
            Andy314A Offline
            Andy314
            wrote on last edited by
            #6

            I see in the taskmanager that all threads are in full working - the CPU is glowing ;-)

            1 Reply Last reply
            0
            • JonBJ JonB

              @Christian-Ehrlicher So C++17 compilation could be substantially slower than older versions? Sad... :(

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @JonB yes, because of all the new headers with a lot of template stuff. That's the main reason why Qt6 builds slower.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1
              • goldenhawkingG Offline
                goldenhawkingG Offline
                goldenhawking
                wrote on last edited by
                #8

                The compilation speed of C++is a magical thing. For machines with the same configuration, Linux GCC (Ubuntu x64) is twice as fast as VC, and VC is 2-3 times faster than msys2's GCC. If you heavily use C++templates on Raspberry Pi, it can be very time-consuming. Sometimes memory overhead can directly lead to computer downtime.

                Qt is the best C++ framework I've ever met.

                1 Reply Last reply
                0
                • hskoglundH Offline
                  hskoglundH Offline
                  hskoglund
                  wrote on last edited by
                  #9

                  If you're still on Windows 10, a RAM disk drive could speed up the compile times, e.g. ImDisk

                  V 1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    Volker75
                    wrote on last edited by Volker75
                    #10

                    Well, compile time is also slower with Linux. I didn't checked if it is mainly because of Qt 5 to Qt 6 or because of the newer gcc version. But it was always like this.
                    Don't forget that newer compiler also tries to detect more bugs and warnings. That need time.
                    In my opinion compile time is not too critical, even my project need much time to compile. Because in normal case I don't compile the whole project. In normal case I need to compile only a few changed files and that is in most cases very fast.
                    If the compiler is too slow, you might think about disabling the warnings.
                    Also the compilers are slower, because they have new algorithms how they can improve the run time speed! And in my case runtime speed is the most imported stuff that i need. If your runtime is not critical, then you might also think about compiling only with a lower optimization like -o1.
                    you can see a nice comparison on Linux with different compilers, Qt versions and 32 vs 64 bit in my YouTuve video:
                    https://www.youtube.com/watch?v=l6bFVfcvUpc

                    1 Reply Last reply
                    0
                    • hskoglundH hskoglund

                      If you're still on Windows 10, a RAM disk drive could speed up the compile times, e.g. ImDisk

                      V Offline
                      V Offline
                      Volker75
                      wrote on last edited by Volker75
                      #11

                      @hskoglund said in Projekt compile time with Qt 6 much slower than Qt 5:

                      If you're still on Windows 10, a RAM disk drive could speed up the compile times, e.g. ImDisk

                      You are sure that will help? Never tried with Windows, but with Linux.
                      I compiled my project with Linux.
                      One time on my fast SSD.
                      And the other time i connected a USB 2.0 sdCard reader and used my oldest and cheapest sdCard. So this device is much slower, but the compile time difference was below 1%

                      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