Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-07-22 07:05:44


I'm afraid we have a serious performance problem. I've wrote a simple
example, where a rule calls itself recursively until a recursion limit is
reached. In each invocation, a simple class is created. There's a table,
giving the number of time jam's function 'hashitem' is called, which is
responsible for a large fraction of jam's running time.

Limit Calls
1 1082194
200 1276412
300 1433818
400 1631218
500 1868618
600 2146018
700 2463418
800 2820818

(about 2179 per level)

Now let's try without creating the class.
1 1081336
800 1104008

(about 28 per level w/o)

This is very slow! It essentially means that if I switch from using jam list
to using contaner.vector in one place, I'll have 100x slowdown. Actually...
it seems worse than that: each construction of class causes a call to
BACKTRACE and that rule returns the list of all stack frames -- I suspect a
quadratic running time is possible.

As an experiment, I've replaced the call to BACKTRACE in class.__init__ to
call of a new builtin which directly returns the caller. This
resulted in 1485639 calls for limit or 800 ( 504 calls per level).
That's clearly not enough, and we need to do something more. Personally, I'd
prefer introducing 10 new builtins to having such overhead.

At this stage it is still possible to work on build system, but once we start
trying real examples, this will become problem #1.

- 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