Skip to contentSkip to conversation

cooker: Use a queue to feed parsing jobs

PATCH Richard Purdie 1 participant 1 message Jul 7, 2025 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · Richard Purdie via lists.openembedded.org

Curerntly, recipes to parse are split into equal groups and passed to each parse thread at the start of parsing. We can replace this with a queue and collect a new job as each parsing process becomes idle to better spread load in the case of slow parsing jobs.

Some of the data we need has to be passed in at fork time since it can't be pickled, so the job to parse is only referenced as an index in that list.

Quoted 7 lines

This should better spread load for slow to parse recipes such as those with many class extensions.

---
 lib/bb/cooker.py | 33 +++++++++++++++++++++------------

 1 file changed, 21 insertions(+), 12 deletions(-)

Sadly this is still wrong and adds delays to parser shutdown. I'll continue to try and work out how to make everything work together.

Cheers,

Richard