View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0008726 | CMake | CMake | public | 2009-03-11 18:53 | 2009-03-17 13:10 | ||||
Reporter | Derek Bruening | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0008726: progress and status messages slow down build by up to 50% => should be disable-able | ||||||||
Description | CMake invokes two extra commands prior to compiling each source file: a message "Building C object foo.c.obj" and a status update "[xx%]". On Windows, when building my C software, these extra commands, each invoking a separate instance of cmake.exe, increase the build time by nearly 50% under cygwin as compared to the hand-written gmake Makefiles I was using before (invoking the same cl.exe and other tools): pre-CMake raw Makefiles using cygwin make: 1:06 CMake -G"Unix Makefiles" + cygwin make: 1:40 -DCMAKE_COLOR_MAKEFILE=OFF makes a marginal difference (uses "echo" instead of "cmake -E cmake_echo_color") but not much: CMake -G"Unix Makefiles" + cygwin make: 1:38 NMake is faster but as we will see still slowed down noticeably: CMake -G"NMake Makefiles" + nmake: 0:51 Now if I hand-remove most of the two status commands via for i in `find . -name \*build.make`; do sed -i '/cmake_echo/d;/progress/d' $i; done We have: CMake -G"Unix Makefiles" + cygwin make: 1:08 CMake -G"NMake Makefiles" + nmake: 0:46 There is no option to remove either the "Building" message or the progress messages. I opened this case as a Performance Bug, and it would be best addressed by adding two new option variables, perhaps CMAKE_ENABLE_PROGRESS and CMAKE_ENABLE_STATUS, so that I can disable both. When I'm doing batch builds I don't want either of the messages (cl.exe is already printing out the name of each file in any case); for a user building my software once, I do think the messages are useful. Perhaps a separate case should be opened for longer-term solutions that keep the progress messages but implement them more performantly. Certainly the "Building" message could be folded into the cmake_progress_start command. Or maybe just printing the progress on each target instead of each file is sufficient for a Makefile build. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0015662) Derek Bruening (reporter) 2009-03-11 18:55 |
xref bug 5323 proposing an environment variable (seems an odd choice) to disable progress messages but for different reasons |
(0015701) Brad King (manager) 2009-03-16 16:23 |
The following commits allow progress rules to be disabled. You can build with -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_RULE_PROGRESS=OFF to avoid all the extra processes. ENH: Factor out makefile progress rule commands /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v <-- Source/cmMakefileTargetGenerator.cxx new revision: 1.116; previous revision: 1.115 /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v <-- Source/cmMakefileTargetGenerator.h new revision: 1.27; previous revision: 1.26 ENH: Allow projects to disable per-rule progress /cvsroot/CMake/CMake/Modules/CMakeGenericSystem.cmake,v <-- Modules/CMakeGenericSystem.cmake new revision: 1.21; previous revision: 1.20 /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v <-- Source/cmMakefileTargetGenerator.cxx new revision: 1.117; previous revision: 1.116 /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v <-- Source/cmMakefileTargetGenerator.h new revision: 1.28; previous revision: 1.27 /cvsroot/CMake/CMake/Source/cmake.cxx,v <-- Source/cmake.cxx new revision: 1.413; previous revision: 1.412 /cvsroot/CMake/CMake/Tests/Complex/CMakeLists.txt,v <-- Tests/Complex/CMakeLists.txt new revision: 1.73; previous revision: 1.72 |
(0015703) Brad King (manager) 2009-03-16 16:29 |
Oops, my 'echo' tests were in plain .bat files not in NMake or cygwin Make. It looks like the make tools will still start a whole process for each echo line too. |
(0015706) Brad King (manager) 2009-03-16 16:57 |
Okay, let's try this again. I renamed RULE_PROGRESS to RULE_MESSAGES and made it apply to both progress and status. I see no reason to allow either one without the other. Now you can build with -DCMAKE_RULE_MESSAGES=OFF to avoid the extra processes. I suggest using CMAKE_VERBOSE_MAKEFILE too so you can see what is going on if something fails. STYLE: Separate unrelated logic /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v <-- Source/cmMakefileLibraryTargetGenerator.cxx new revision: 1.70; previous revision: 1.69 ENH: Allow projects to disable per-rule echo lines /cvsroot/CMake/CMake/Modules/CMakeGenericSystem.cmake,v <-- Modules/CMakeGenericSystem.cmake new revision: 1.22; previous revision: 1.21 /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v <-- Source/cmMakefileExecutableTargetGenerator.cxx new revision: 1.55; previous revision: 1.54 /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v <-- Source/cmMakefileLibraryTargetGenerator.cxx new revision: 1.71; previous revision: 1.70 /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v <-- Source/cmMakefileTargetGenerator.cxx new revision: 1.118; previous revision: 1.117 /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v <-- Source/cmMakefileTargetGenerator.h new revision: 1.29; previous revision: 1.28 /cvsroot/CMake/CMake/Source/cmake.cxx,v <-- Source/cmake.cxx new revision: 1.414; previous revision: 1.413 /cvsroot/CMake/CMake/Tests/Complex/CMakeLists.txt,v <-- Tests/Complex/CMakeLists.txt new revision: 1.74; previous revision: 1.73 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-03-11 18:53 | Derek Bruening | New Issue | |
2009-03-11 18:55 | Derek Bruening | Note Added: 0015662 | |
2009-03-12 14:33 | Bill Hoffman | Status | new => assigned |
2009-03-12 14:33 | Bill Hoffman | Assigned To | => Bill Hoffman |
2009-03-16 16:22 | Brad King | Assigned To | Bill Hoffman => Brad King |
2009-03-16 16:23 | Brad King | Note Added: 0015701 | |
2009-03-16 16:26 | Brad King | Note Added: 0015702 | |
2009-03-16 16:28 | Brad King | Note Deleted: 0015702 | |
2009-03-16 16:29 | Brad King | Note Added: 0015703 | |
2009-03-16 16:57 | Brad King | Note Added: 0015706 | |
2009-03-17 13:10 | Brad King | Status | assigned => closed |
2009-03-17 13:10 | Brad King | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |