]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
codeparser: Only load the codeparser cache once
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Nov 2015 16:56:32 +0000 (08:56 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Nov 2015 11:42:56 +0000 (11:42 +0000)
The server state gets reset multiple times during startup and currently
we reload the codeparser cache each time. This is pointless and causes
unnecessary interaction time with bitbake.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/codeparser.py

index 82a3af4e06f62f015bc633f8d763e83e4da02a11..6c9a42dc390950a6d89fc8d8484f0c672f8a7553 100644 (file)
@@ -144,6 +144,10 @@ class CodeParserCache(MultiProcessCache):
         return cacheline
 
     def init_cache(self, d):
+        # Check if we already have the caches
+        if self.pythoncache:
+            return
+
         MultiProcessCache.init_cache(self, d)
 
         # cachedata gets re-assigned in the parent