[cmake-developers] [CMake 0011412]: Speedup calls to find_library and find_path

Mantis Bug Tracker mantis at public.kitware.com
Sat Nov 6 06:40:35 EDT 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11412 
====================================================================== 
Reported By:                Christian Ehrlicher
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11412
Category:                   CMake
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-11-06 06:40 EDT
Last Modified:              2010-11-06 06:40 EDT
====================================================================== 
Summary:                    Speedup calls to find_library and find_path
Description: 
cmFindLibraryCommand and others initialize the documentation in the ctor.
This doesn't make sense and slows down cmake execution (especially because
it looks like for every find_foo command a new cmFindFoo instance is
created). I've split out the generation of documentation to the (already
virtual) GetFullDocumentation() - call. This speeds up my project for
http://public.kitware.com/Bug/view.php?id=22#c10
percent (which is http://public.kitware.com/Bug/view.php?id=41#c1 second). Maybe
it's worth to change all cmFindFoo
commands this way?
Attached you can find a patch I used for this quick test. It's against
4.8.3. A diff between the original and the modified output of '--help-full'
shows no difference.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-11-06 06:40 Christian EhrlicherNew Issue                                   

2010-11-06 06:40 Christian EhrlicherFile Added: cmake_strstr.diff               
    
======================================================================




More information about the cmake-developers mailing list