Don't re-check dependencies in a single run.
If a depends on b depends on c, then if when we consider building a, we have to check b and c. If we then are asked about a2 which depends on b, there is no reason to re-check b and its dependencies; we already know it's done. This takes the time to do 'redo t/curse/all' the *second* time down from 1.0s to 0.13s. (make can still do it in 0.07s.) 'redo t/curse/all' the first time is down from 5.4s to to 4.6s. With -j4, from 3.0s to 2.5s.
This commit is contained in:
parent
de042fc2f2
commit
2f604b2c8f
3 changed files with 25 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ from helpers import debug, err, mkdirp, unlink
|
|||
|
||||
|
||||
def _dirty_deps(t, depth, fromdir):
|
||||
if state.ismarked(t, fromdir):
|
||||
return False # has already been checked during this session
|
||||
debug('%s?%s\n' % (depth, t))
|
||||
stamptime = state.stamped(t, fromdir)
|
||||
if stamptime == None:
|
||||
|
|
@ -29,6 +31,7 @@ def _dirty_deps(t, depth, fromdir):
|
|||
if dirty_deps(name, depth + ' ', fromdir=vars.BASE):
|
||||
#debug('%s-- DIRTY (sub)\n' % depth)
|
||||
return True
|
||||
state.mark(t, fromdir)
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue