diff options
author | Steven Knight <knight@baldmt.com> | 2005-03-05 15:50:59 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-03-05 15:50:59 (GMT) |
commit | f7230b12d84220342c2671276beec9a9d590ce22 (patch) | |
tree | b79cffeaf872e0fe23c37fd6dd0b670e8e14e953 /src/engine/SCons/Executor.py | |
parent | 81e49da9da4df0dab0041dbc2d499048f38ed4f4 (diff) | |
download | SCons-f7230b12d84220342c2671276beec9a9d590ce22.zip SCons-f7230b12d84220342c2671276beec9a9d590ce22.tar.gz SCons-f7230b12d84220342c2671276beec9a9d590ce22.tar.bz2 |
Reduce gen_binfo() time for very long source lists.
Diffstat (limited to 'src/engine/SCons/Executor.py')
-rw-r--r-- | src/engine/SCons/Executor.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/engine/SCons/Executor.py b/src/engine/SCons/Executor.py index c425a05..fb15661 100644 --- a/src/engine/SCons/Executor.py +++ b/src/engine/SCons/Executor.py @@ -187,12 +187,19 @@ class Executor: """ return filter(lambda s: s.missing(), self.sources) - def get_source_binfo(self, calc): + def get_source_binfo(self, calc, ignore=[]): """ + Return three lists, one of the source files, one of their + calculated signatures, and one of their strings (path names). __cacheable__ """ + sourcelist = self.sources + if ignore: + sourcelist = filter(lambda s, i=ignore: not s in i, sourcelist) calc_signature = lambda node, calc=calc: node.calc_signature(calc) - return map(lambda s, c=calc_signature: (s, c(s), str(s)), self.sources) + return (sourcelist, + map(calc_signature, sourcelist), + map(str, sourcelist)) @@ -219,8 +226,8 @@ class Null: pass def get_missing_sources(self): return [] - def get_source_binfo(self, calc): - return [] + def get_source_binfo(self, calc, ignore=[]): + return ([], [], []) |