Skip to contentSkip to conversation

codeparser: Only load the codeparser chace once

PATCH In review Richard Purdie 2 participants 2 messages Nov 11, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 codeparser: Only load the codeparser chace once

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.

bitbake/lib/bb/codeparser.py +4 -0
index 82a3af4..6c9a42d 100644
@@ -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
#1 lore raw

Is that a typo in the symmary "chace"?

Quoted 23 lines · Richard Purdie

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.

bitbake/lib/bb/codeparser.py +4 -0
index 82a3af4..6c9a42d 100644
@@ -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