Author Topic: Project building speed up  (Read 5676 times)

Offline Bat

  • Multiple posting newcomer
  • *
  • Posts: 48
Project building speed up
« on: November 20, 2013, 08:48:47 pm »
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 !


Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Project building speed up
« Reply #1 on: November 20, 2013, 10:30:13 pm »
Question : is there an interest in this ?
This issue has bugged me for a while, so interest, yes; I currently do not have time to look into your patch/explore possible solutions though.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Project building speed up
« Reply #2 on: November 24, 2013, 12:38:24 am »
Yes, there is, but I'm more interested in a proper solution not a hack, but as a start a hack could do.

I've tried to raise this problem before, but no one knowledgeable enough answered and
I'm afraid that I'm not able to fully understand the code to a level I'm able to modify it without breaking something.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]