[cmake-developers] CMake master slowdown in generation step
Nils Gladitz
nilsgladitz at gmail.com
Fri Apr 4 11:52:27 EDT 2014
On 04.04.2014 17:35, Brad King wrote:
> On 04/04/2014 11:13 AM, Stephen Kelly wrote:
>> The Ninja generator was much slower than the Makefiles generator. I pushed
>> the optimize-source-file-processing topic with a commit which should fix the
>> major problem with Ninja. I'll see if there is more opportunity for
>> optimizing/caching though in general.
Thanks!
> I see this commit in that topic:
>
> Ninja: Query custom commands once per target, not once per file.
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c202d15
>
> Nils, your example just had a lot of source files but no custom
> commands. Is the slowdown observable with Makefile generators?
>
I ran timings with my test case:
v3.0.0-rc3
Makefile: 0m1.588s
Ninja: 0m1.101s
8cd113ad1d715cc9ce865956870cd462d3659089
Makefile: 0m20.261s
Ninja: 2m26.905s
042c1c834e69ee60b605b02bad8be87b2193a7d2
Makefile: 0m21.346s
Ninja: 2m29.916s
stage/optimize-source-file-processing
Makefile: 0m11.575s
Ninja: 0m11.002s
The slowdowns in the two commits seem to be unrelated in the way thy are
triggered and the test case only shows the slow down in the first commit.
The Makefile generator slow down is less prominent than Ninja but it is
still present for both.
Nils
More information about the cmake-developers
mailing list