I've searched why building a project with lot of target (for example Code::Blocks wx2.8.x) where all but one are up to date, take some times in target where there is nothing to build (about 15s for 26 target on my computer : Core I3, 2.3GHz).
It goes to CompilerCommandGenerator classe that is instantied for each target (or event each command line, don't check exactly). All stuf is done on Init where all commands for all targets are generated, with script called if necessary, and so on
In my understanding, this behaviour is needed because project can change at any time. Is there other things that can need an update ?
During a build project I think there is no change possible ?
I've implemented an ugly patch to try. It create a "cache" for CompilerCommandGenerator instance, to clear cache there is an ugly hookup in cbProject ... but results show a 10x speed increase (about 1.5s in my computer). It seems to work for Code::Blocks wx2.8.x project
Question : is there an interest in this ? Any drawback waited ? How to "cleanly" do this ? What modification are acceptable on cbProject ?
Note : to be very clear speed increase is ONLY on 'make' part (ie : -------xxxxx-------), not on external compiler part !