[jamming] massive potential JAM speedup
Craig Allsop
cjamallsop at gmail.com
Sun Dec 9 16:35:27 PST 2007
Hi.
Which version of jam do you have? The latest stock source of jam (2.5)
has no make0includes or make0gatherincludes2.
Craig.
On Dec 9, 2007 6:55 AM, Jan van Valburg <jan at rpgfan.demon.co.uk> wrote:
>
>
>
>
> Hi this e-mail is for anyone who has knowledge of the JAM source-code, in
> particular the make0includes function.
>
>
>
> I have been looking at speeding up JAM, in particular the make0includes
> function.
>
> This function does two things:
>
> 1) for each target, collect all includes below it in the hierarchy and
> add it to it's own list
>
> 2) call itself for all it's children in the hierarchy
>
>
>
> Wouldn't it be more optimal to do step 2 first?
>
> 1) recurse down the hierarchy until we reach a leaf
>
> 2) as we recurse back up the hierarchy, propagate the includes from
> the leaves to the root target
>
> If we collect the includes for the targets at the bottom of the hierarchy
> first (leaves), then as we work our way to the top(root) all we have to do
> is add the includes of our children. We don't have to recurse down the
> entire tree for every target, because the target's direct children already
> have all the includes further down the tree.
>
>
>
> Only two small changes are needed to make.c:
>
>
>
> * in make0includes we move 'step 2' to after 'step 3'.
>
> * in make0gatherincludes2 we comment out the line that reads
>
> 'chain = make0gatherincludes2(tname, chain, c->target);'
>
>
>
> Making the change speeds up JAM by 10x. Functionality appears to be the
> same.
>
>
>
> Could anyone that's knowledgeable on JAM please verify for me that this
> change doesn't break anything?
>
> If anyone has any questions about this I'd be happy to answer them.
>
>
>
> Kind regards
>
> --
>
> Jan
>
>
>
>
> _______________________________________________
> jamming mailing list - jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
>
>
More information about the jamming
mailing list