Re: [CMake] cmake script profiler

2013-04-25 Thread Alexander Neundorf
On Wednesday 24 April 2013, Bill Hoffman wrote: ... Without measuring anything, there is something else I thought about: there are now a bunch of useful, quite complex macros coming with cmake, which are used quite often: e.g. ExternalProject, cmake_parse_arguments(),

Re: [CMake] cmake script profiler

2013-04-25 Thread Kyle Heath
Volo, Thanks for sharing your cmake-profile-stats tool... I found it very useful. With this tool and about ~10 minutes of tweaking, my configure phase runs ~4x faster! @Bill: I hope similar profiling features will be included in a future release! Cheers, Kyle PS: I added a small extension to

Re: [CMake] cmake script profiler

2013-04-24 Thread Gregoire Aujay
to write many small files on the HD which seems to be very slow on windows. Regards, Gregoire From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Volo Zyko Sent: mardi 23 avril 2013 21:51 To: cmake@cmake.org Subject: [CMake] cmake script profiler Hi all, We have

Re: [CMake] cmake script profiler

2013-04-24 Thread Bill Hoffman
On 4/24/2013 5:37 AM, Gregoire Aujay wrote: Hello, Are you using cmake with a Makefiles generator on Windows ? From my experiments here are my observations: -Makefiles on Windows: slow -Visual ide generator : fast -Makefiles on linux: fast I found that when there are many targets in a

Re: [CMake] cmake script profiler

2013-04-24 Thread Volo Zyko
. ** ** Regards, Gregoire ** ** ** ** *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On Behalf Of *Volo Zyko *Sent:* mardi 23 avril 2013 21:51 *To:* cmake@cmake.org *Subject:* [CMake] cmake script profiler ** ** Hi all, ** ** We have a rather big project

Re: [CMake] cmake script profiler

2013-04-24 Thread Bill Hoffman
On 4/24/2013 3:07 PM, Volo Zyko wrote: Hi, We use Makefiles on Linux and MacOS. Windows is not our target platform. From what we see Linux is the fastest. We made few attempts of building our project on Windows in VS but it was very-very slow and definitely cmake generates too many project

Re: [CMake] cmake script profiler

2013-04-24 Thread Alexander Neundorf
On Tuesday 23 April 2013, Bill Hoffman wrote: On 4/23/2013 3:50 PM, Volo Zyko wrote: Hi all, We have a rather big project and use cmake for building it. At some point our cmake scripts became very slow (around 4 minutes for single cmake run). We are thinking now how to speed up it.

Re: [CMake] cmake script profiler

2013-04-24 Thread Bill Hoffman
On 4/24/2013 3:18 PM, Alexander Neundorf wrote: When looking at this I wouldn't know immediately where to start when trying to make it faster, probably _vtk_module_config_recurse(). set() is probably there because it is called really often. I would assume that if() is called significantly less

Re: [CMake] cmake script profiler

2013-04-24 Thread Volo Zyko
We have executables and libraries and a lot of custom targets (the project is organized so that we export headers during the build - not the best idea in the world). However, I finished (more or less) the script for building time stats from the cmake's trace and we (with my colleague) found the

Re: [CMake] cmake script profiler

2013-04-24 Thread Jean-Christophe Fillion-Robin
Hi Volo, If you are doing some topological sorting to build your library/executable in the right order. Instead of using CMake based solution, you could may be rely on a C++ approach ? This is what we are doing in CTK. We are using a small prog named ctkDependencyGraph that we build at configure

Re: [CMake] cmake script profiler

2013-04-24 Thread Volo Zyko
Hi Jean-Christophe, Thanks for the suggestion. We'll definitely consider it. -- Volo Zyko On Thu, Apr 25, 2013 at 12:23 AM, Jean-Christophe Fillion-Robin jchris.filli...@kitware.com wrote: Hi Volo, If you are doing some topological sorting to build your library/executable in the right

Re: [CMake] cmake script profiler

2013-04-24 Thread Jean-Christophe Fillion-Robin
Hi, If it turns out to be usefull for you. We could also consider creating a dedicated github project to avoid code duplication. That way you would be able to either add it as a git submodule to your project or checkout this new small project at configure time [1] Hth Jc [1]

Re: [CMake] cmake script profiler

2013-04-24 Thread Bill Hoffman
On 4/24/2013 5:13 PM, Volo Zyko wrote: We have executables and libraries and a lot of custom targets (the project is organized so that we export headers during the build - not the best idea in the world) Can you consolidate them into larger custom targets that use custom commands instead?

[CMake] cmake script profiler

2013-04-23 Thread Volo Zyko
Hi all, We have a rather big project and use cmake for building it. At some point our cmake scripts became very slow (around 4 minutes for single cmake run). We are thinking now how to speed up it. Searching the web and this list didn't give any results. It looks like there is no such thing as

Re: [CMake] cmake script profiler

2013-04-23 Thread Bill Hoffman
On 4/23/2013 3:50 PM, Volo Zyko wrote: Hi all, We have a rather big project and use cmake for building it. At some point our cmake scripts became very slow (around 4 minutes for single cmake run). We are thinking now how to speed up it. Searching the web and this list didn't give any results.

Re: [CMake] cmake script profiler

2013-04-23 Thread Jean-Christophe Fillion-Robin
Hi Bill, Would it be possible to share the topic implementing your profiling code ? By default, summing the time spent in each functions makes sens. That said, it would also be nice to have the option of having detailed trace info, coupled with convenient code like message(START_PROFILING) and

Re: [CMake] cmake script profiler

2013-04-23 Thread Volo Zyko
On Wed, Apr 24, 2013 at 12:07 AM, Bill Hoffman bill.hoff...@kitware.com wrote: That's funny. I was just playing around with adding a profile option. My approach was to sum up all the time spent in each function. It does not have a call stack but, should give you an idea of where it is spending