Here is what we discovered. It looks like that when cmake write the install 
manifest file, it does it in a for_loop for each file, which in the end turns 
out to be 5000+ file open/close, and then our administrator controlled 
anti-virus checks the file each time, considerably slowing everything down.

We just changed the logic to write the install manifest file in a single file 
open/close rather than for each file, and it completely fixes our issue; it's 
now back to normal install times, now takes less than a second compared to 50+ 
seconds previously.

Patch file attached.
Please consider it for CMake 3.2!
Thanks!


-----Original Message-----
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Tuesday, February 24, 2015 10:07 AM
To: Robert Goulet; Joshua Clayton
Cc: cmake-developers@cmake.org
Subject: Re: [cmake-developers] cmake install command expected performance?

On 02/24/2015 10:03 AM, Robert Goulet wrote:
> Yes comparing timestamp is the way to go, but why is it so slow in cmake?

I've never observed that being slow in practice.

You'll have to profile CMake while running in this case, or add some print 
statements with high-precision timestamps to see where the time is going.

-Brad

Attachment: patch_install_manifest_optimize.patch
Description: patch_install_manifest_optimize.patch

-- 

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/mailman/listinfo/cmake-developers

Reply via email to