From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode Date: Sun, 29 Dec 2019 16:23:46 +0100 Message-ID: <877e2fm9z1.fsf@gmx.de> References: <83fthj3p1b.fsf@gnu.org> <87woauyckt.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165124"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 38644@debbugs.gnu.org To: Peter Ludemann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 29 16:24:32 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ilaQh-000goP-Bf for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Dec 2019 16:24:31 +0100 Original-Received: from localhost ([::1]:52806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilaQf-0005qM-9o for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Dec 2019 10:24:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43698) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilaQF-0005qC-PD for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2019 10:24:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilaQE-00047g-Na for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2019 10:24:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilaQE-00046a-EN for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2019 10:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ilaQE-0006ho-8u for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2019 10:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2019 15:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38644 X-GNU-PR-Package: emacs Original-Received: via spool by 38644-submit@debbugs.gnu.org id=B38644.157763303525764 (code B ref 38644); Sun, 29 Dec 2019 15:24:02 +0000 Original-Received: (at 38644) by debbugs.gnu.org; 29 Dec 2019 15:23:55 +0000 Original-Received: from localhost ([127.0.0.1]:60082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilaQ7-0006hU-4x for submit@debbugs.gnu.org; Sun, 29 Dec 2019 10:23:55 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:34587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilaQ5-0006hH-Rw for 38644@debbugs.gnu.org; Sun, 29 Dec 2019 10:23:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577633027; bh=HaC/XWZHoj7PpoXHBiy38nT/3K07m5AEIRjsYv4G2+8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=G74JBwHnNwDh0j5GVguukCw/NWjFNaRguBwxOz241L74gdpghNQI6Vlj5BjQTC1wa BOOtv4cn/9xGdos2TWLWcl6/+ZLrtNLhm/Qtkr8cjL2S0nBO47tYhfSrxaj6mLcwMv lWS7viRTxwOOlCKPPgPWkSk70+tqPGlGRPzTcRI4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.91.238.169]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MFKKX-1iwv6I0YVl-00Fiwy; Sun, 29 Dec 2019 16:23:47 +0100 In-Reply-To: (Peter Ludemann's message of "Sat, 28 Dec 2019 13:12:24 -0800") X-Provags-ID: V03:K1:b9w4nZSKxuEeOknyL+aE6+SL9lFyvJM7FFYR83CuhRncYFqDjXG ZZUI6XrjvC6WbToteHbNtsS6KKdT+/+SSuyxmzriZXyOjvIu0XoLq0uSubkEVjBBg4A02NE qAeF2+VaCc6HdRqfFppLczt8MbP2INtoF/UOx9ly4/lJhUYvcnJCkN2XGen/Y/H/MRaTP3k DG9L3Tj5IaGkBQG+AQ7MA== X-UI-Out-Filterresults: notjunk:1;V03:K0:IOEJF1bwehE=:t/y80Z9P3UMqIkBooEYwIt aVrA/3D0f1qRT9DQnxKtghj/hUg950GVex+rQoy2I/X6KuBvbPNWeR2cAuq1WV1W87pqroX6+ vl3hB1WVk6qTXfSFME062zkq33McfTkOIxV1XOSoLWjvJLj7QKGAc7HOgTixNNDLVYNEKHTHQ P2So7K6l6oAkvsack/cFPLBNBA7pZD8W3yDJQPpjpkiQNnKzazkiIJ3Z/LF7yrvvoIRchWlwz Ni2QU+FHThUgf+IZUmg0ISkl2mui2GItGtHQCmkLUPYiXmGy6VV9EMaap0js5KquHjNvsO4fo zemyvBsNFFzou9MakDSFLtFTUhw8rJEPsi6jNbgSOhrS73FZqKHBZrRIJJl0zcvIt1hrYWoDb 7m2ZIiAO5T7HlQxqRHyjo6Aks85mggb4KreN453DJBeKIYwM3j82p/QnjhZ3GdnVpJSrHH+a8 3AtGBHYUUmMwX3i4/ziq97D76E2D56/cFU/bw6fYVrmupcWWKQve7K/Px0xL3oZ7iGOvyFfuN q6W4VDynCqhqA21I1WLXChU2+dINlNc1DP/rdb1B/G2BTvdanFXqwnBY384Q9QXUCGRkOrfIL Qhq066VL/etjxDRib5OwZdnxq4Njxsb4TdMzrsl/et2+1Hw6/Zb8lj8jMVyvR7/BgXBg1AZHO pY2BZLN0uwVUj3ztS9uuG0kH+H22dlFnhTtSIWGiz4K3pZHFqakjJRYSGHRZwPU2ubCav93gI xrsKvBvWKqGipxcJW9YFhke1HztKaPGhGqvNANAZwCLFBF6OMero+MoM1VIpR8nJ1Azw035j X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173891 Archived-At: Peter Ludemann writes: Hi Peter, >> In bug#33194, a patch for Emacs 27.0.50 is mentioned. Do you have a >> chance to run this for test? > > Emacs 27.0.50 somewhat fixes the problem with global-auto-revert-mode, > using the same desktop file (and same open files) that was causing > problems with Emacs 26.3. (Sorry I took so long to test this.) Thanks for the feedback, the fix in Emacs 27 seems to work. > Emacs CPU utilization is now ~30-80% (according to top(1)) instead of > 100%; and responsiveness is good. Of course, it would be nicer if > emacs CPU utilization were less, so that I could fully utilize that > core (I only have 4 cores, so losing half a core is notable on large > tests). If I count correctly, your desktop file contains 489 buffers. Heavy load for global-auto-revert-mode. > Michael Albinus - you had a number of other questions ... do you still > want them (or some of them) answered? No, I don't believe so. > PS: Here's the desktop file, in case that can give some clue as to > what file or directory is causing problems. The "compilation" > processes both input from and output into /tmp/pykythe_test -- as you > can see, there are a couple of open files from that directory, but > they're not being continuously updated, only once or twice per test. auto-revert watches directories. Even if you watch only some few files in a directory (I count 29 buffers which are bound to "/tmp"), there will be lot of file notification events when other files in that directory are changed. Maybe it helps to set auto-revert-use-notify to nil for those files? You could do it via directory-local variales, as in (dir-locals-set-class-variables 'auto-revert-with-polling '((nil . ((auto-revert-use-notify . nil))))) (dir-locals-set-directory-class "/tmp/" 'auto-revert-with-polling) (This is untested.) > best, > - peter Best regards, Michael.