Re: [Interest] slower compilation with Qt6

2023-07-24 Thread Hamish Moffatt via Interest

On 24/7/23 17:01, Cristian Adam wrote:
The compilation time degradation is being tracked at [QTBUG-97601] 
Compilation speed decrease with Qt 6.2 compared to Qt 5.15.2 - Qt Bug 
Tracker 


For Qt Creator I use https://ccache.dev/ (yes, it works with MSVC) so 
that even if it takes longer to compile, I won't be compiling the same 
file in same situation twice.



Thanks, good to know this a known issue with work in progress. I do use 
ccache on my linux builds, though I'm finding it increasingly unreliable 
with PCH enabled so I will have to decide which is more useful.



My test compile results for 5.15.13 versus 6.5.2 are even worse than the 
figures you reported in that issue.



For a project with ~600 TUs, compiled on linux with clang 14, PCH on but 
no ccache, I see 40 seconds -> 96 seconds.



For another project with ~900 TUs, compiled with MSVC 2022 with jom, PCH 
on but no ccache, I see 178 seconds -> 332.




I compile with CONFIG += c++2a on both Qt versions.


Hamish
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] slower compilation with Qt6

2023-07-24 Thread Cristian Adam via Interest
The compilation time degradation is being tracked at [QTBUG-97601] Compilation 
speed decrease with Qt 6.2 compared to Qt 5.15.2 - Qt Bug 
Tracker

For Qt Creator I use https://ccache.dev/ (yes, it works with MSVC) so that even 
if it takes longer to compile, I won't be compiling the same file in same 
situation twice.

Cheers,
Cristian


From: Interest  on behalf of Hamish Moffatt 
via Interest 
Sent: Monday, July 24, 2023 06:11
To: interest@qt-project.org 
Subject: [Interest] slower compilation with Qt6

I've just finished porting my application from Qt 5.15 to 6.5, and I'm
finding that compilation is significantly slower now - builds take twice
as long or more. For example a linux-g++ build of a project with ~650 .o
files has gone from 45 seconds to 100. I see similar increases on
Windows with MSVC2022, and in other projects with more compilation units.

I'm already using precompiled headers, including a bunch of Qt headers
and some STL.

The next MSVC2022 preview release has a "Build Insights" feature which
shows time spent processing header files, and my biggest culprits are
some headers of mine that use a lot of Q_GADGET and Q_PROPERTY macros.


Does anyone have any suggestions on how to speed things up? I see some
other comments about this online for example
https://forum.qt.io/topic/142309/compilation-times-with-qt6/12



Thanks

Hamish



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest