[cmake-developers] CMake master slowdown in generation step
Stephen Kelly
steveire at gmail.com
Sat Apr 5 07:08:20 EDT 2014
Brad King wrote:
> On 04/04/2014 11:57 AM, Stephen Kelly wrote:
>> I've pushed another commit which gets the time for the 2000 file testcase
>> from about 20s to about 4s for both Ninja and Makefiles. It fails a few
>> unit tests though and I don't have time right now to find out why. 4s is
>> still a bit much, so there's probably more opportunity.
>
> So far your optimizations seem to be in areas that could have been
> optimized before commit 8cd113ad1d715cc9ce865956870cd462d3659089
> caused this major slowdown.
Optimizations that were possible before a refactoring become necessary
afterward. That is not surprising.
I don't understand the point you're making here.
> That one is:
>
> cmTarget: Store strings instead of cmSourceFile* to represent SOURCES
>
> I suspect the performance drop is due to carrying around lots of
> strings instead of raw pointers.
The carrying doesn't seem to have been the problem. The problem seemed to be
requiring matching/mapping of strings back to cmSourceFile objects.
> You'll have to find another
> way to represent that. Otherwise this performance drop is too
> high a cost to pay for the target-sources feature and we will
> have to revert that until another solution is found.
There is no cause for alarm.
Things are going according to plan. Get the feature right, and optimize
later:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/3615/focus=5250
I agree of course that the performance is master currently is not
acceptable.
Re-cmake with v2.8.12.2:
$ time cmake ..
real 0m0.712s
user 0m0.692s
sys 0m0.020s
$ time cmake ..
real 0m0.709s
user 0m0.697s
sys 0m0.012s
$ time cmake ..
real 0m0.718s
user 0m0.716s
sys 0m0.000s
$ time cmake .. -GNinja
real 0m0.692s
user 0m0.674s
sys 0m0.020s
$ time cmake .. -GNinja
real 0m0.730s
user 0m0.695s
sys 0m0.036s
$ time cmake .. -GNinja
real 0m0.693s
user 0m0.678s
sys 0m0.016s
Re-cmake with optimize-source-file-processing:
$ time cmake ..
real 0m0.733s
user 0m0.689s
sys 0m0.046s
$ time cmake ..
real 0m0.747s
user 0m0.724s
sys 0m0.024s
$ time cmake ..
real 0m0.757s
user 0m0.743s
sys 0m0.012s
$ time cmake .. -GNinja
real 0m0.352s
user 0m0.328s
sys 0m0.024s
$ time cmake .. -GNinja
real 0m0.363s
user 0m0.359s
sys 0m0.004s
$ time cmake .. -GNinja
real 0m0.355s
user 0m0.348s
sys 0m0.008s
Thanks,
Steve.
More information about the cmake-developers
mailing list