summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-01-03 20:57:22 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 15:00:18 +0000
commitaae85325289a83d21606621310894d5d6f56b50a (patch)
tree6037e272963f3c4a68e567db7167a68b0914d8c0
parentc9d4807662494aa313c9b5b3bb5de6f8a25d32d3 (diff)
downloadpoky-aae85325289a83d21606621310894d5d6f56b50a.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()). (Bitbake rev: 884365228fcaac07421ac1440d4946693fb628c5) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--bitbake/lib/bb/cache.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 2f89350763..c477501d68 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -347,13 +347,9 @@ class Cache(object):
347 347
348 self.checked.add(fn) 348 self.checked.add(fn)
349 349
350 # Pretend we're clean so getVar works
351 self.clean.add(fn)
352
353 # File isn't in depends_cache 350 # File isn't in depends_cache
354 if not fn in self.depends_cache: 351 if not fn in self.depends_cache:
355 logger.debug(2, "Cache: %s is not cached", fn) 352 logger.debug(2, "Cache: %s is not cached", fn)
356 self.remove(fn)
357 return False 353 return False
358 354
359 mtime = bb.parse.cached_mtime_noerror(fn) 355 mtime = bb.parse.cached_mtime_noerror(fn)
@@ -409,6 +405,7 @@ class Cache(object):
409 self.clean.remove(fn) 405 self.clean.remove(fn)
410 return False 406 return False
411 407
408 self.clean.add(fn)
412 return True 409 return True
413 410
414 def remove(self, fn): 411 def remove(self, fn):