On 10/12/19 9:14 am, Adam Light wrote:


When I previously analyzed the sampling data during a moc.exe run, it was clear that the vast majority of the time was spent satisfying the includes, and most of that was checking whether a concatenation of an include path and a file name are a valid file (eg. include/path1/stdio, include/path2/stdio, etc.). It seems like the compiler (cl.exe) would need to do essentially the same thing when compiling each individual file, but it's not nearly as slow as moc.


If my memory serves me correctly, we found MOC drastically slower when we upgraded from Qt 4.8 to 5.x. We had quite a few directories in INCLUDEPATH, though nothing like the number you mentioned.

To get acceptable performance we trimmed INCLUDEPATH to a higher level directory and started referencing <module/file.h> instead of just <file.h>.


At development time we build in Visual Studio using the vcxproj generator in qmake, which won't run multiple MOC steps in paralle. If you think your MOC time is bad, imagine running them serially... We had to rewrite our build scripts to use JOM for release builds due to this.


Hamish

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

Reply via email to