From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Peter Ludemann Newsgroups: gmane.emacs.bugs Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode Date: Mon, 6 Jan 2020 16:01:22 -0800 Message-ID: References: <7C3E0AFE-BCA6-4FAF-9EA0-FB0E79BAD443@acm.org> <0723EC9F-3A54-4E84-8D96-EA8D17985A62@acm.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001a87ef059b817cad" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="37796"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38644@debbugs.gnu.org, Michael Albinus To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 07 01:10:56 2020 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 1iocSV-0009hk-Qb for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2020 01:10:55 +0100 Original-Received: from localhost ([::1]:55856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iocST-0001uy-Aa for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 19:10:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58454) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iocKt-00012n-B6 for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 19:03:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iocKr-0007Cs-Tk for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 19:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iocKr-0007Ca-Pk for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 19:03:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iocKr-0006JH-MS for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 19:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2020 00:03:01 +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.157835532724142 (code B ref 38644); Tue, 07 Jan 2020 00:03:01 +0000 Original-Received: (at 38644) by debbugs.gnu.org; 7 Jan 2020 00:02:07 +0000 Original-Received: from localhost ([127.0.0.1]:47024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iocJy-0006HK-Pr for submit@debbugs.gnu.org; Mon, 06 Jan 2020 19:02:07 -0500 Original-Received: from mail-lf1-f43.google.com ([209.85.167.43]:38689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iocJw-0006Gg-Sv for 38644@debbugs.gnu.org; Mon, 06 Jan 2020 19:02:05 -0500 Original-Received: by mail-lf1-f43.google.com with SMTP id r14so37614090lfm.5 for <38644@debbugs.gnu.org>; Mon, 06 Jan 2020 16:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rfG7YswoX2wsb/Xwt+N0JyG3gzZ72a2X0B0AnDAs0sk=; b=qeci2EHKnvWVga9rlRlVpnIuXFX0SGHGjelTsqy7UnLrSLB2qu3MIuCoch422icpx5 UMNPCaqZKlBHVjWxazKeAofD/JY3IE5I6mE0S6tN01SFWlgpB3kA3ozJ/baVxDvZBTir CWmYkmduWLyCmc5I9kqYgv/7jhEKzShcAGVSfQT+h9rOpDok0t3Mt8HfWQxh/Pdn8p9s WV5+/THeFXzKbsmlE1tXrjFgPKzsfx881aKOYPBX2AIKX9sZLW/t2CwGcQkqMYFinPkk DSOLB+rpv9wyr98Om6GsGhpow7pB6E24ZwfF7J7+5/9QfgKbj8q7DSvTnzFriclBmJdf t44A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rfG7YswoX2wsb/Xwt+N0JyG3gzZ72a2X0B0AnDAs0sk=; b=ehR6G3gn7jyUFJ0AVZBUEMAO+pbUC51q0KwE74GNi6M7NX4+FqEtd+w8tjI9zvWSxD QElPNHehJanUtkxnkYvwCmYsrG64lL0FWvbLzX1T46yE8t7Y8A996M5e6sbMUbzMrUTB up+P4nuvdkHMyh7OTuavDxa+qJkQDEOPmvtvSI4av+rOc5jF8xb+C11PpVQHRlmiim/F lYfL74+RKcMoG2hE6E40YuR47tD+2ciiuIjp9s6RlFRl2sv453StJfFsXIzSKne1xVvg OeeEi3tMkfPQSWgFjKOKPmdCY4/oa//JCS83kh4wUfZZyRDw17nrOi9KyCcaRddGfkFR 38hQ== X-Gm-Message-State: APjAAAWj8TJwDpX/vXFTLT8ybJQixtunLT4OhH6y/BeF8xtw/dUMmkko B1NslslDtol8l1AUXELDMyaPdCo8agSfRTgN+tk= X-Google-Smtp-Source: APXvYqyECQuG+mTsGL/CNc6df33LD/h/Wb1pelHPpdeA4f/Csx2rF5ntKLtljaXU2oE1sb+uNlewqcqv80DcGAAVm+0= X-Received: by 2002:a19:f619:: with SMTP id x25mr56306646lfe.146.1578355318751; Mon, 06 Jan 2020 16:01:58 -0800 (PST) In-Reply-To: <0723EC9F-3A54-4E84-8D96-EA8D17985A62@acm.org> 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:174277 Archived-At: --0000000000001a87ef059b817cad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If anything, auto-revert-avoid-polling makes responsiveness worse -- the window locked up a few times on me while doing ctrl-N while running a CPU-intensive (and possibly IO-intensive) compilation. Although I might not have set the value correctly ... I did M-x customise-variable RET auto-revert-avoid-polling RET then "toggle" then "apply". . On Sun, 5 Jan 2020 at 11:57, Mattias Engdeg=C3=A5rd wrot= e: > 5 jan. 2020 kl. 20.31 skrev Peter Ludemann : > > > Which version of Emacs would you like me to try this with? And what > result are you expecting/hoping to see? (e.g., might it reduce the curren= t > 30-80% CPU load for polling with emacs 28.0.50?) There are only a few ope= n > files directly under /tmp, so would this have any effect or does it > propagate down to subdirectories? > > > > [Also, I'd need a few more details (not being an emacs-internals person= ) > ... should I add this to my .emacs and restart, or execute in a scratch > buffer, or ...?] > > 'auto-revert-avoid-polling' is a single global customisable variable, so > you would set it using > > M-x customise-variable RET auto-revert-avoid-polling RET > > , then turn it on and apply the change. I believe it was introduced in > Emacs 27. > > The idea is to save CPU by not having to look at files periodically to se= e > if they have changed. I have no idea if you would see any improvement at > all, but it shouldn't make anything worse. > > --0000000000001a87ef059b817cad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If anything, auto-revert-avoid-polling makes responsiveness wor= se -- the window locked up a few times on me while doing ctrl-N while runni= ng a CPU-intensive (and possibly IO-intensive) compilation.
Although I migh= t not have set the value correctly ... I did=C2=A0M-x customise-variable RET auto-revert-avoid-= polling RET then "toggle" then "apply".
.

On Sun, 5 Jan 2020 at 11:57, Mattias Engdeg=C3=A5rd <mattiase@acm.org> wrote:
5 jan. 2020 kl. 20.31 skrev Peter Ludema= nn <peter.= ludemann@gmail.com>:

> Which version of Emacs would you like me to try this with? And what re= sult are you expecting/hoping to see? (e.g., might it reduce the current 30= -80% CPU load for polling with emacs 28.0.50?) There are only a few open fi= les directly under /tmp, so would this have any effect or does it propagate= down to subdirectories?
>
> [Also, I'd need a few more details (not being an emacs-internals p= erson) ... should I add this to my .emacs and restart, or execute in a scra= tch buffer, or ...?]

'auto-revert-avoid-polling' is a single global customisable variabl= e, so you would set it using

=C2=A0M-x customise-variable RET auto-revert-avoid-polling RET

, then turn it on and apply the change. I believe it was introduced in Emac= s 27.

The idea is to save CPU by not having to look at files periodically to see = if they have changed. I have no idea if you would see any improvement at al= l, but it shouldn't make anything worse.

--0000000000001a87ef059b817cad--