Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is much slower than 2.8.12.1

2014-01-21 Thread Clinton Stimpson
On Thursday, January 16, 2014 08:41:58 AM Clinton Stimpson wrote:
 On Thursday, January 16, 2014 10:14:32 AM Bill Hoffman wrote:
  Moving this to cmake-developers list:
  
  On 1/16/2014 9:55 AM, Clinton Stimpson wrote:
   On one of my projects, I see ~3.0 seconds for CMake 2.8.12 and ~3.8
   seconds
   for CMake master.  I don't have an idea why, but with my test, it
   doesn't
   see like much slower.
  
  3.8 from 3.0 is much slower in my book  :)
  
  change it to minutes... 3 minutes vs 3.8 minutes is a big jump...
  
  Looking at the test timing on the bootstrap test on a slow machine, this
  seems to be a point that got slower:
  
  http://open.cdash.org/testDetails.php?test=229000913build=3172685   885
  seconds
  http://open.cdash.org/testDetails.php?test=229192425build=3173776   902
  seconds
  
  -Bill
 
 For this one project I got 3.0 seconds - 3.8 seconds.
 I narrowed it down to this commit:
 
 commit 2509c7678feb2efab79a384fd0b0b35cee8d02b0
 Author: Stephen Kelly steve...@gmail.com
 Date:   Mon Jan 13 13:04:03 2014 +0100
 Qt4: Use generator expression in COMPILE_DEFINITIONS (#14692)
 
 
 
 
 I'm surprised how this small change added a 20% slowdown.
 -set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
 +set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $$NOT:
 $CONFIG:Debug:QT_NO_DEBUG)

I tried this project on Windows with CMake master (my own build) and CMake 
(kitware build) and CMake master was slightly faster, then modifying 
UseQt.cmake made it slightly faster still.

Dominik, if you are seeing a massive slowdown, can you narrow it down?
It may not be generator expression related at all.

-Clint
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is much slower than 2.8.12.1

2014-01-16 Thread Bill Hoffman

Moving this to cmake-developers list:

On 1/16/2014 9:55 AM, Clinton Stimpson wrote:

On one of my projects, I see ~3.0 seconds for CMake 2.8.12 and ~3.8 seconds
for CMake master.  I don't have an idea why, but with my test, it doesn't see
like much slower.

3.8 from 3.0 is much slower in my book  :)

change it to minutes... 3 minutes vs 3.8 minutes is a big jump...

Looking at the test timing on the bootstrap test on a slow machine, this 
seems to be a point that got slower:


http://open.cdash.org/testDetails.php?test=229000913build=3172685   885 
seconds
http://open.cdash.org/testDetails.php?test=229192425build=3173776   902 
seconds


-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is much slower than 2.8.12.1

2014-01-16 Thread Clinton Stimpson
On Thursday, January 16, 2014 10:14:32 AM Bill Hoffman wrote:
 Moving this to cmake-developers list:
 
 On 1/16/2014 9:55 AM, Clinton Stimpson wrote:
  On one of my projects, I see ~3.0 seconds for CMake 2.8.12 and ~3.8
  seconds
  for CMake master.  I don't have an idea why, but with my test, it doesn't
  see like much slower.
 
 3.8 from 3.0 is much slower in my book  :)
 
 change it to minutes... 3 minutes vs 3.8 minutes is a big jump...
 
 Looking at the test timing on the bootstrap test on a slow machine, this
 seems to be a point that got slower:
 
 http://open.cdash.org/testDetails.php?test=229000913build=3172685   885
 seconds
 http://open.cdash.org/testDetails.php?test=229192425build=3173776   902
 seconds
 
 -Bill

For this one project I got 3.0 seconds - 3.8 seconds.
I narrowed it down to this commit:

commit 2509c7678feb2efab79a384fd0b0b35cee8d02b0
Author: Stephen Kelly steve...@gmail.com
Date:   Mon Jan 13 13:04:03 2014 +0100
Qt4: Use generator expression in COMPILE_DEFINITIONS (#14692)




I'm surprised how this small change added a 20% slowdown.
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $$NOT:
$CONFIG:Debug:QT_NO_DEBUG)

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is much slower than 2.8.12.1

2014-01-16 Thread Ben Boeckel
On Thu, Jan 16, 2014 at 08:41:58 -0700, Clinton Stimpson wrote:
 I'm surprised how this small change added a 20% slowdown.
 -set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
 +set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $$NOT:
 $CONFIG:Debug:QT_NO_DEBUG)

There's a lot of places where std::string gets passed as a const char*
only to be turned back into a std::string in the function. Would it be
worth me trying to resurrect that branch again? It wasn't worth much
last I tried, but that was before a lot of the generator expression
stuff was added.

I guess another question is whether the genex is evaluated once or
per-target (I'd guess the latter which might be the reason especially if
Qt4 is found at the top-level of a larger project).

--Ben
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is much slower than 2.8.12.1

2014-01-16 Thread Clinton Stimpson
On Thursday, January 16, 2014 11:49:58 AM Ben Boeckel wrote:
 On Thu, Jan 16, 2014 at 08:41:58 -0700, Clinton Stimpson wrote:
  I'm surprised how this small change added a 20% slowdown.
  -set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG
  QT_DEBUG)
  +set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $$NOT:
  $CONFIG:Debug:QT_NO_DEBUG)
 
 There's a lot of places where std::string gets passed as a const char*
 only to be turned back into a std::string in the function. Would it be
 worth me trying to resurrect that branch again? It wasn't worth much
 last I tried, but that was before a lot of the generator expression
 stuff was added.
 
 I guess another question is whether the genex is evaluated once or
 per-target (I'd guess the latter which might be the reason especially if
 Qt4 is found at the top-level of a larger project).


From a bit of profiling, std::string construction did take a sizable amount of 
time, but its not clear how much of that was redundant.

However, the profile of my test case showed that the time increase is in the 
parser (yylex).  Perhaps someone else can look further into this.

Clint
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is much slower than 2.8.12.1

2014-01-16 Thread Brad King
On 01/16/2014 02:18 PM, Clinton Stimpson wrote:
 On Thursday, January 16, 2014 11:49:58 AM Ben Boeckel wrote:
 On Thu, Jan 16, 2014 at 08:41:58 -0700, Clinton Stimpson wrote:
 I'm surprised how this small change added a 20% slowdown.
 -set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG
 QT_DEBUG)
 +set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $$NOT:
 $CONFIG:Debug:QT_NO_DEBUG)
[snip]
 However, the profile of my test case showed that the time increase is in the 
 parser (yylex).  Perhaps someone else can look further into this.

The addition of '$' to the value to causes the fast-path in
cmMakefile::ExpandVariablesInString to be skipped:

 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefile.cxx;hb=v2.8.12.1#l2535
 if ( source.empty() || source.find_first_of($@\\) == source.npos)
   {
   return source.c_str();
   }

Instead full expansion using cmCommandArgumentParserHelper occurs
which is much slower.  The latter code path is ripe for optimization
by re-implementing it without flex/bison generators.  Unfortunately
the current logic has so many idiosyncrasies that a re-implementation
will almost certainly introduce subtle behavior changes.

-Brad

-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers