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. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers