Patchwork [bitbake-devel] runqueue.py: Optimise the hashvalidate call to only process tasks we may actually want

login
register
mail settings
Submitter Richard Purdie
Date July 25, 2012, 7:17 p.m.
Message ID <1343243839.27838.16.camel@ted>
Download mbox | patch
Permalink /patch/33067/
State New
Headers show

Comments

Richard Purdie - July 25, 2012, 7:17 p.m.
Currently we call the hashvalidate for anything without a valid setscene stamp.
This improves the code to account for existing stamp files so that we only process
setscene hashes for things we might actually end up using. This avoids hash processing
and makes things slightly more efficient and the logs less confusing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 2925741..fd33d07 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1510,6 +1510,12 @@  class RunQueueExecuteScenequeue(RunQueueExecute):
                     self.task_skip(task)
                     continue
 
+                if self.rq.check_stamp_task(realtask, taskname, recurse = True, cache=self.stampcache):
+                    logger.debug(2, 'Normal stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(realtask))
+                    stamppresent.append(task)
+                    self.task_skip(task)
+                    continue
+
                 sq_fn.append(fn)
                 sq_hashfn.append(self.rqdata.dataCache.hashfn[fn])
                 sq_hash.append(self.rqdata.runq_hash[realtask])