From aae85325289a83d21606621310894d5d6f56b50a Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 3 Jan 2011 20:57:22 +0100 Subject: 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()). (Bitbake rev: 884365228fcaac07421ac1440d4946693fb628c5) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- bitbake/lib/bb/cache.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 2f8935076..c477501d6 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -347,13 +347,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) @@ -409,6 +405,7 @@ class Cache(object): self.clean.remove(fn) return False + self.clean.add(fn) return True def remove(self, fn): -- cgit v1.2.3