]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: Further optimise pyinotify
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Jan 2015 11:16:20 +0000 (11:16 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Jan 2015 11:36:10 +0000 (11:36 +0000)
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.

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

index 9086f92e5cbd8c0f9fb61df0786bf9860ce21766..554dfbd24d1d1f447fbfeda153e6d560c144294d 100644 (file)
@@ -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)