* [PATCH] cache: Don't reload the cache file since we already have this data in memory
@ 2014-07-25 13:50 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-07-25 13:50 UTC (permalink / raw)
To: bitbake-devel
If we're writing out merged data to disk, its safe to assume that either
we loaded the data or couldn't. Loading it again is relatively pointless
and time consuming.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 936829b..6dedd4d 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -814,15 +814,7 @@ class MultiProcessCache(object):
glf = bb.utils.lockfile(self.cachefile + ".lock")
- try:
- with open(self.cachefile, "rb") as f:
- p = pickle.Unpickler(f)
- data, version = p.load()
- except (IOError, EOFError):
- data, version = None, None
-
- if version != self.__class__.CACHE_VERSION:
- data = self.create_cachedata()
+ data = self.cachedata
for f in [y for y in os.listdir(os.path.dirname(self.cachefile)) if y.startswith(os.path.basename(self.cachefile) + '-')]:
f = os.path.join(os.path.dirname(self.cachefile), f)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-25 13:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 13:50 [PATCH] cache: Don't reload the cache file since we already have this data in memory Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox