[bitbake-devel] server/process: Optimise latency when finishing idle functions

Submitted by Richard Purdie on March 10, 2014, 12:59 a.m.


Message ID 1394413150.7883.21.camel@ted
State New
Headers show

Commit Message

Richard Purdie March 10, 2014, 12:59 a.m.
When idle functions finish, its likely we have some other work
to do, so don't sleep in the select call but instead, skip it.
This removes small amounts of latency in common commands.

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

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 07688a2..577c250 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -128,6 +128,7 @@  class ProcessServer(Process, BaseImplServer):
                 retval = function(self, data, False)
                 if retval is False:
                     del self._idlefuns[function]
+                    nextsleep = None
                 elif retval is True:
                     nextsleep = None
                 elif nextsleep is None: