summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/exceptions.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-25 23:12:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-26 23:01:33 +0000
commit4c69970bd379f441279fe46edd92613e80ea3dc5 (patch)
tree9bdc859bae95c32bff537946de8d742d167c9223 /bitbake/lib/bb/exceptions.py
parent3ca58c762f09047c3798ef982b4c6fcd395a5809 (diff)
downloadpoky-4c69970bd379f441279fe46edd92613e80ea3dc5.tar.gz
bitbake: runqueue: Optimise next_buildable_task()
This unlikely looking function was found to be eating a lot of CPU time since it gets called once per trip through the idle loop if we're not running a maximum number of processes. This was particularly true in world builds of 13,000 tasks. Calling the computation code is pretty pointless because until some other task finishes nothing is going to become available to build. We can know when things become available so this patch teaches the scheduler this knowledge. It also: * skips any coputation when nothing can be built * if there is only one available item to build, ignore the priority map * precomputes the stamp filenames, rather than doing it every time * saves the length of the array rather than calculating it each time (the extra function overhead is significant) Timing wise, initially, 5000 iterations through here was 20s, with the patch 200000 calls takes the same time. The end result is that builds get up and running faster. (Bitbake rev: 4841c1d37c503a366f99e3a134dca7440e3a08ea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/exceptions.py')
0 files changed, 0 insertions, 0 deletions