summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/debian.bbclass
diff options
context:
space:
mode:
authorEtienne Cordonnier <ecordonnier@snap.com>2023-09-21 09:56:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-06 16:45:11 +0000
commitf1b0ab7e4b1cfeabaa8f981175e503d0c435ba0b (patch)
tree224e12e16188e74ca46679952ef608d4d593c419 /meta/classes-global/debian.bbclass
parent7de36b25d1df97b105fb52b5dc3c62ab1800fb3a (diff)
downloadpoky-f1b0ab7e4b1cfeabaa8f981175e503d0c435ba0b.tar.gz
bitbake: bitbake-worker: add header with length of message
The IPC mechanism between runqueue.py and bitbake-worker is currently not scalable: The data is sent with the format <tag>pickled-data</tag>, and bitbake-worker has no information about the size of the message. Therefore, the bitbake-worker is calling select() and read() in a loop, and then calling "self.queue.find(b"</" + item + b">")" for each chunk received. This does not scale, because queue.find has a linear complexity relative to the size of the queue, and workerdata messages get very big e.g. for builds which reference a lot of files in SRC_URI. The number of chunks varies, but on my test system a lot of chunks of 65536 bytes are sent, and each iteration takes 0.1 seconds, making the transfer of the "workerdata" data very slow (on my test setup 35 seconds before this fix, and 1.5 seconds after this fix). This commit adds a 4 bytes header after <tag>, so that bitbake-worker knows how many bytes need to be received, and does not need to constantly search the whole queue for </tag>. (Bitbake rev: 595176d6be95a9c4718d3a40499d1eb576b535f5) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global/debian.bbclass')
0 files changed, 0 insertions, 0 deletions