From 7c9444e9a58438058ec577bd8c2e51820c98072d Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 18 Nov 2010 22:47:36 -0700 Subject: cache: sync the cache file to disk in the background This version uses a thread rather than a process, to avoid problems with waitpid handling. This gives slightly less overall build time reduction than the separate process for it did (this reduces a -c compile coreutils-native by about 3 seconds, while the process reduced it by 7 seconds), however this time is quite insignificant relative to a typical build. The biggest issue with non-backgrounded syncing is the perceived delay before work begins, and this resolves that without breaking anything, or so it seems. (Bitbake rev: 5ab6c5c7b007b8c77c751582141afc07c183d672) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/event.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/bb/event.py') diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 5f292bccbc..5b0a183acd 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -296,10 +296,16 @@ class MultipleProviders(Event): """ return self._candidates -class ParseProgress(Event): - """ - Parsing Progress Event - """ +class ParseStarted(Event): + """Recipe parsing for the runqueue has begun""" + def __init__(self, total, skipped, masked): + Event.__init__(self) + self.total = total + self.skipped = skipped + self.masked = masked + +class ParseCompleted(Event): + """Recipe parsing for the runqueue has completed""" def __init__(self, cached, parsed, skipped, masked, virtuals, errors, total): Event.__init__(self) @@ -312,6 +318,12 @@ class ParseProgress(Event): self.sofar = cached + parsed self.total = total +class ParseProgress(Event): + """Recipe parsing progress""" + + def __init__(self, current): + self.current = current + class DepTreeGenerated(Event): """ Event when a dependency tree has been generated -- cgit v1.2.3-54-g00ecf