Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-07-29 07:30:27


David Abrahams wrote:

> Only:
>
> 1. It's a bit of a hack (not that that has ever stopped us in
> the past, when it comes to the Jam core ;->)
>
> 2. it might slow down actual rule lookups.

It might. OTOH, it will decrease memory footprint and might improve
performance due to better cache utulization.

> 3. I don't think it will help in many cases. For example, I
> think when we do inheritance it imports the rules as
> non-dotted names.

I'm actually considering core support for classes...
> Maybe it would be better to:
>
> A. refactor modules.import so that it calls a different rule for
> "wholesale imports", then profile again

Done. The new rule is 'modules.import-module', which looks like:

rule import-module ( m : caller ? )
{
local all-rules = [ RULENAMES $(m) ] ;

# import all the rules with qualification
IMPORT $(m) : $(all-rules) : $(caller) : $(m).$(all-rules) ;
return $(all-rules) ;
}

and profile is
http://zigzag.cs.msu.su:7813/profile.html

Hmm... the net time for this rule alone is 1second. Pretty high.

> B. sink the entire code for the offending import functionality
> into 'C'

I think IMPORT_MODULE might have other uses. For example, it can be used to
speed up "new". Instead of importing all rules, you'd just import one module
to global module.

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk