diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-09 17:55:45 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-10 11:10:00 -0700 |
commit | aadfea6be629a17e4e26747aba4f59f5ac8e7558 (patch) | |
tree | b9491516757b2243b56b1b7b1cbf7e06770f435e /bitbake/lib/bb/taskdata.py | |
parent | 0b4ae1c7742cec14395a0d845e1ed42b88b0e215 (diff) | |
download | openembedded-core-contrib-aadfea6be629a17e4e26747aba4f59f5ac8e7558.tar.gz |
bitbake: providers/runqueue/taskdata: Optimise logger.debug calls
A run of "bitbake bash -c unpack" when the task has already been
completed resulted in about 9000 calls to logger.debug(). With this
patch which comments out some noisy/less usefull logging and moves
other logging calls outside loops, this number is reduced to 1000
calls. This results in cleaner logs and gives a small but
measurable 0.15s speedup. The log size dropped from 900kb to 160kb.
(Bitbake rev: d2677f084fe1d8846db77d89ef5e6ffb18dc171a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r-- | bitbake/lib/bb/taskdata.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 58fe1995f2..af72a1fb09 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py @@ -207,23 +207,29 @@ class TaskData: if not fnid in self.depids: dependids = {} for depend in dataCache.deps[fn]: - logger.debug(2, "Added dependency %s for %s", depend, fn) dependids[self.getbuild_id(depend)] = None self.depids[fnid] = dependids.keys() + logger.debug(2, "Added dependencies %s for %s", str(dataCache.deps[fn]), fn) # Work out runtime dependencies if not fnid in self.rdepids: rdependids = {} rdepends = dataCache.rundeps[fn] rrecs = dataCache.runrecs[fn] + rdependlist = [] + rreclist = [] for package in rdepends: for rdepend in rdepends[package]: - logger.debug(2, "Added runtime dependency %s for %s", rdepend, fn) + rdependlist.append(rdepend) rdependids[self.getrun_id(rdepend)] = None for package in rrecs: for rdepend in rrecs[package]: - logger.debug(2, "Added runtime recommendation %s for %s", rdepend, fn) + rreclist.append(rdepend) rdependids[self.getrun_id(rdepend)] = None + if rdependlist: + logger.debug(2, "Added runtime dependencies %s for %s", str(rdependlist), fn) + if rreclist: + logger.debug(2, "Added runtime recommendations %s for %s", str(rreclist), fn) self.rdepids[fnid] = rdependids.keys() for dep in self.depids[fnid]: |