diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2011-01-03 20:57:22 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:56:35 +0000 |
commit | 884365228fcaac07421ac1440d4946693fb628c5 (patch) | |
tree | cfffc54c34cdf341ec70a3f763bf81b393183c36 /lib/bb/cache.py | |
parent | 739a8ce6ac688061afd55cd3c980d0e9e45c5930 (diff) | |
download | bitbake-884365228fcaac07421ac1440d4946693fb628c5.tar.gz |
cache: defer marking fn as clean
Only mark fn as clean if it is clean.
This saves us from removing (prematurely added) fn from our clean set
and saves me a few percent of runtime (and misleading debugging output
from remove()).
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'lib/bb/cache.py')
-rw-r--r-- | lib/bb/cache.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py index d72622d74..e1800bb5e 100644 --- a/lib/bb/cache.py +++ b/lib/bb/cache.py @@ -331,13 +331,9 @@ class Cache(object): self.checked.add(fn) - # Pretend we're clean so getVar works - self.clean.add(fn) - # File isn't in depends_cache if not fn in self.depends_cache: logger.debug(2, "Cache: %s is not cached", fn) - self.remove(fn) return False mtime = bb.parse.cached_mtime_noerror(fn) @@ -393,6 +389,7 @@ class Cache(object): self.clean.remove(fn) return False + self.clean.add(fn) return True def remove(self, fn): |