diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-10 15:57:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-11 16:20:40 +0100 |
commit | 6ab3945fc54b2a242292a874d78ebd8cccb99573 (patch) | |
tree | df0d3ad8266db6870d9d8f91e86ed0f5c8cc1cf6 | |
parent | 6d0abc6a5c9b8b37eecfa63fbcb5343162bc9311 (diff) | |
download | bitbake-6ab3945fc54b2a242292a874d78ebd8cccb99573.tar.gz |
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 rev: a2d441237916a99405b800c1a3dc39f860100a8c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cooker.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 614d47d16..e965bcc44 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -180,7 +180,10 @@ 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) while True: # We try and add watches for files that don't exist but if they did, would influence # the parser. The parent directory of these files may not exist, in which case we need |