Since I can remember, on Windows, for our project (open_iA), there was a short “pause” at the beginning of the “generate” phase; meaning, for example in the GUI, there is no visual feedback in the first few seconds after pressing the Generate button, only then the progress bar starts to indicate progress.
I never put much thought into it so far as it went by very quickly, but starting with 3.21, we see a steep increase in this “pause” time, as compared to 3.20.x:
With 3.20.5, the pause is ~3-5 seconds
With 3.21, the pause increased more than 6-fold to over 30 seconds.
To investigate where this pause is coming from, I’ve tried playing around with --debug-output and --trace options to cmake, but in that pause, there is no output on the command line - the last output line is “Configuring done”, and no output occurs during the pause.
Does anybody have an idea where this pause / the slowdown between 3.20 and 3.21 could come from?
I do suspect it’s something that’s not set up ideally in our cmake files that’s causing this, because other examples run fast with 3.21 on the same machine; I just don’t have any idea how to debug this any further - so thanks in advance for any hints!
This is likely due to some change in genex evaluation. Or there are simply far more genexes in 3.21. A bisection of CMake itself to find out where the performance difference was introduced would be nice to have (git bisect --first-parent is likely to be accurate enough).
Since this merge has to do with the autouic process - we are using AUTOUIC; and that reminds me that with 3.21 another peculiarity started in our project: For all targets created in a subdirectory, now all generated ui_xyz.h files are added to each targets’ (Visual Studio) project (all .ui files from all targets are included in all targets - altough each of them is only referenced in the source files of a single target - and that four times, once for each configured build type in the VS multi-config generator); before (i.e. with 3.20.x and less), they were not shown in the project at all. The addition of these files to the project seems mostly “cosmetical”, but probably has to do with being able to properly resolve dependencies?
The .ui files for the targets are in separate subfolders (one for each target), and the source files for each target only include those in the respective subfolder, and only the correct .h files for each single target are in the target- and configuration-specific subfolder in the build directory (e.g. if the target’s name is Test, they get created in Test_autogen/include_(Debug|Release|…) - so I’m not sure why CMake does add all ui_xyz.h files to all targets…