diff options
| author | Chris Larson <chris_larson@mentor.com> | 2010-11-18 22:47:36 -0700 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:43 +0000 |
| commit | 7c9444e9a58438058ec577bd8c2e51820c98072d (patch) | |
| tree | 55074d2c00afa924707bb5b5d30b22bc6688594d /bitbake/lib/bb/event.py | |
| parent | 95d2f56126d459b9e7f000d22ed7c1206d1a8f68 (diff) | |
| download | poky-7c9444e9a58438058ec577bd8c2e51820c98072d.tar.gz | |
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 <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/event.py')
| -rw-r--r-- | bitbake/lib/bb/event.py | 20 |
1 files changed, 16 insertions, 4 deletions
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): | |||
| 296 | """ | 296 | """ |
| 297 | return self._candidates | 297 | return self._candidates |
| 298 | 298 | ||
| 299 | class ParseProgress(Event): | 299 | class ParseStarted(Event): |
| 300 | """ | 300 | """Recipe parsing for the runqueue has begun""" |
| 301 | Parsing Progress Event | 301 | def __init__(self, total, skipped, masked): |
| 302 | """ | 302 | Event.__init__(self) |
| 303 | self.total = total | ||
| 304 | self.skipped = skipped | ||
| 305 | self.masked = masked | ||
| 306 | |||
| 307 | class ParseCompleted(Event): | ||
| 308 | """Recipe parsing for the runqueue has completed""" | ||
| 303 | 309 | ||
| 304 | def __init__(self, cached, parsed, skipped, masked, virtuals, errors, total): | 310 | def __init__(self, cached, parsed, skipped, masked, virtuals, errors, total): |
| 305 | Event.__init__(self) | 311 | Event.__init__(self) |
| @@ -312,6 +318,12 @@ class ParseProgress(Event): | |||
| 312 | self.sofar = cached + parsed | 318 | self.sofar = cached + parsed |
| 313 | self.total = total | 319 | self.total = total |
| 314 | 320 | ||
| 321 | class ParseProgress(Event): | ||
| 322 | """Recipe parsing progress""" | ||
| 323 | |||
| 324 | def __init__(self, current): | ||
| 325 | self.current = current | ||
| 326 | |||
| 315 | class DepTreeGenerated(Event): | 327 | class DepTreeGenerated(Event): |
| 316 | """ | 328 | """ |
| 317 | Event when a dependency tree has been generated | 329 | Event when a dependency tree has been generated |
