Skip to contentSkip to conversation

cooker: Further optimise pyinotify

PATCH New Richard Purdie 1 participant 1 message Jan 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: Further optimise pyinotify

We currently add crazy numbers of watches on files. The per user limit is 8192 by default and on a system handling multiple builds, this can be an issue.

We don't need to watch all files individually, we can watch the directory containing the file instead. This gives better resource utilisation and better performance further reverting some of the performance regression seen with the introduction of pyinotify.

bitbake/lib/bb/cooker.py +1 -1
index 9086f92..554dfbd 100644
@@ -182,7 +182,7 @@ class BBCooker:
         if not watcher:
             watcher = self.watcher
         for i in deps:
-            f = i[0]
+            f = os.path.dirname(i[0])
             if f in watcher.bbseen:
                 continue
             watcher.bbseen.append(f)