Boost logo

Boost-Build :

From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-06-04 11:43:21


Vladimir Prus <ghost_at_[hidden]> writes:

> Soon after Dave's changes to import semantics, I've noticed slowdown in V2.
> Sometimes, before complain about syntax error in some module, bjam waits some
> seconds. Luckily, we've got profiling, so here's profile of
> 'examples-v2/hello':
>
> 2310000 140000 773 modules.import
> 2310000 0 1 boost-build
> 2300000 110000 937 modules.load
> 1630000 1530000 1544 modules.normalize-raw-paths
> 1360000 10000 107 class.new
> 1340000 10000 107 class.instance
> 1060000 20000 203 class.__init__
> 890000 0 6 object(main-target)@1.generate-really
> 890000 0 6 object(main-target)@1.generate
> 890000 0 1 object(project-target)@1.generate
> 870000 0 6 object(typed-target)@1.generate
> 630000 0 2 object(typed-target)@1.construct
> 600000 10000 12 generators.construct
>
> The 'modules.mormalize-raw-paths' takes more time than actually building
> targets! I think that now that "import" is required in every class, and is
> called during construction of all instances, we *really* need to optimize it
> -- and in particular, it should not call 'normalize-raw-paths' in such a way.
> Thoughs?

I think we should optimize normalize-raw-paths; it would be easy to
make a cache of results or to stop work on a path when all of its '.'
characters have been processed. I think the cache is probably the
way to go, though.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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