[cmake-developers] cmake install command expected performance?

Robert Goulet Robert.Goulet at autodesk.com
Thu Feb 26 14:18:04 EST 2015


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.king at kitware.com] 
Sent: Tuesday, February 24, 2015 10:07 AM
To: Robert Goulet; Joshua Clayton
Cc: cmake-developers at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_install_manifest_optimize.patch
Type: application/octet-stream
Size: 888 bytes
Desc: patch_install_manifest_optimize.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150226/2e69f14e/attachment.obj>


More information about the cmake-developers mailing list