From: Richard Purdie Date: Fri, 28 Jan 2011 10:21:41 +0000 (+0000) Subject: bitbake/runqueue.py: Avoid starvation of events to the server X-Git-Tag: 2011-1~2667 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=06c6db7929c75f576a395fb442abe447b833fc3b;p=openembedded-core.git bitbake/runqueue.py: Avoid starvation of events to the server The server UI was reading 1024 bytes, then sleeping for 0.25 seconds. Since most new LogRecord events are larger than this it leads to a build up of data which is only processed slowly, leading to a bottleneck and a slow down of all bitbake processes. Thanks to Dongxiao Xu for the great work in debugging this. A large value has been left in for the read() command just to ensure some fairness amongst process handling if a task tries to log truly huge amounts of data to the server, or goes crazy and ensures the main loop doesn't stall. Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index b9d89ec082..a3f444c2ab 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1637,7 +1637,7 @@ class runQueuePipe(): def read(self): start = len(self.queue) try: - self.queue = self.queue + self.input.read(1024) + self.queue = self.queue + self.input.read(102400) except (OSError, IOError): pass end = len(self.queue)