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:21:47 +0100 |
commit | 0d1f75b9d67aa796a14be115e9f04d5d6247ce40 (patch) | |
tree | e1fce0fb5a88bbebe100ffff45684bffd7e96667 /bitbake | |
parent | 542d9770f28cff298368263dd55f4c6e7bdbfb5c (diff) | |
download | poky-0d1f75b9d67aa796a14be115e9f04d5d6247ce40.tar.gz |
bitbake: 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)
(Bitbake rev: 6ab3945fc54b2a242292a874d78ebd8cccb99573)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 614d47d16f..e965bcc440 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -180,7 +180,10 @@ class BBCooker: | |||
180 | if not watcher: | 180 | if not watcher: |
181 | watcher = self.watcher | 181 | watcher = self.watcher |
182 | for i in deps: | 182 | for i in deps: |
183 | f = i[0] | 183 | f = os.path.dirname(i[0]) |
184 | if f in watcher.bbseen: | ||
185 | continue | ||
186 | watcher.bbseen.append(f) | ||
184 | while True: | 187 | while True: |
185 | # We try and add watches for files that don't exist but if they did, would influence | 188 | # We try and add watches for files that don't exist but if they did, would influence |
186 | # the parser. The parent directory of these files may not exist, in which case we need | 189 | # the parser. The parent directory of these files may not exist, in which case we need |