From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id F1C1F7231B for ; Wed, 21 Jan 2015 11:16:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t0LBGXCb017869; Wed, 21 Jan 2015 11:16:33 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id r28-38i2jZKE; Wed, 21 Jan 2015 11:16:33 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t0LBGK0H017861 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 21 Jan 2015 11:16:31 GMT Message-ID: <1421838980.1798.52.camel@linuxfoundation.org> From: Richard Purdie To: bitbake-devel Date: Wed, 21 Jan 2015 11:16:20 +0000 X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Subject: [PATCH] cooker: Further optimise pyinotify X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 11:16:41 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 9086f92..554dfbd 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -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)