podusowski / pake

Friendly C++ build system which doesn't follow trends
2 stars 1 forks source link

exclude system includes from dependency graph #21

Closed podusowski closed 9 years ago

podusowski commented 9 years ago

Cmake make/ninja seems to ignore system headers (like the ones in /usr/include). Performance gain should be evaluated in pake.

podusowski commented 9 years ago

Ok, I did some quick research. There are 50 compilation units (cpp files), each has 50 levels of includes (1.cpp includes 1_1.hpp, 1_1.hpp includes 1_2.hpp etc), the deepest header includes some system headers (listed in the table). Scanning means including /usr/include and /usr/lib in dependency graph (we use compiler as a scanner so we need to manually exclude them - this is why "clean build" takes longer in case when we don't check /usr/*). Some side observation: note how clean build gets prolonged just by including something.

without scanning
with scanning
system headers clean build no rebuild clean build no rebuild
string 0:05.47
0:05.86
0:05.68
0:00.06
0:00.06
0:00.07
0:05.25
0:05.38
0:05.15
0:00.10
0:00.10
0:00.10
string, iostream, algorithm, memory 0:10.58
0:10.73
0:10.33
0:00.08
0:00.09
0:00.06
0:10.20
0:10.18
0:10.59
0:00.13
0:00.12
0:00.14
string, iostream, algorithm, memory
boost/type_traits.hpp, boost/foreach.hpp, boost/any.hpp boost/shared_ptr.hpp, boost/signals2/signal.hpp
1:39.78 0:00.06 1:38.42 0:00.83