summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 14:50:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-26 08:50:13 +0100
commit97f4d8fa78ec25813bdbda72d4a7c0536c90daa2 (patch)
treeb0c9ce3a5c07eb6f87e90d48df257bc82323835a
parente2e82310a10e11444456f6c9a11f93ed0b2b243a (diff)
downloadpoky-97f4d8fa78ec25813bdbda72d4a7c0536c90daa2.tar.gz
bitbake: 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. (Bitbake rev: 14c31e18e4a4a52ee54056aeefb09ff8c295b475) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cache.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 936829b838..6dedd4d595 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -814,15 +814,7 @@ class MultiProcessCache(object):
814 814
815 glf = bb.utils.lockfile(self.cachefile + ".lock") 815 glf = bb.utils.lockfile(self.cachefile + ".lock")
816 816
817 try: 817 data = self.cachedata
818 with open(self.cachefile, "rb") as f:
819 p = pickle.Unpickler(f)
820 data, version = p.load()
821 except (IOError, EOFError):
822 data, version = None, None
823
824 if version != self.__class__.CACHE_VERSION:
825 data = self.create_cachedata()
826 818
827 for f in [y for y in os.listdir(os.path.dirname(self.cachefile)) if y.startswith(os.path.basename(self.cachefile) + '-')]: 819 for f in [y for y in os.listdir(os.path.dirname(self.cachefile)) if y.startswith(os.path.basename(self.cachefile) + '-')]:
828 f = os.path.join(os.path.dirname(self.cachefile), f) 820 f = os.path.join(os.path.dirname(self.cachefile), f)