cache: Don't reload the cache file since we already have this data in memory
PATCH 1/1 cache: Don't reload the cache file since we already have this data in memory
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 <[email protected]>
bitbake/lib/bb/cache.py +1 -9
@@ -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)