unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Peter Ludemann <peter.ludemann@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 38644@debbugs.gnu.org, Michael Albinus <michael.albinus@gmx.de>
Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode
Date: Mon, 6 Jan 2020 16:34:19 -0800	[thread overview]
Message-ID: <CAHjfyZ1CHo-bOQ+q8VbJ2Ek0CB_N0YaxYrU1Xh7Aw2z=zTo_bA@mail.gmail.com> (raw)
In-Reply-To: <CAHjfyZ1AbgwYq_Nq6UvoAnZpzPKgwxBRFJsx61DJM+E+S9pjaA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

Correction -- the "lock-up" I observed might have been due to paging
(possibly related to emacs - I'll have to investigate later).
Toggling auto-revert-avoid-polling appeared to reduc emacs CPU usage,
according to top(1) - it's a bit difficult to tell because there seems to
be some lag in when the command takes effect and my compilation process
switches a certain amount between CPU-intensive and IO-intensive. Anyway,
CPU seemed to drop from ~60% to ~30% (please take this observation with a
large grain of salt).
I'll try more things in the future and report if anything interesting shows
up.
- peter

On Mon, 6 Jan 2020 at 16:01, Peter Ludemann <peter.ludemann@gmail.com>
wrote:

> 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ård <mattiase@acm.org> wrote:
>
>> 5 jan. 2020 kl. 20.31 skrev Peter Ludemann <peter.ludemann@gmail.com>:
>>
>> > 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 current
>> 30-80% CPU load for polling with emacs 28.0.50?) There are only a few open
>> 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
>> see if they have changed. I have no idea if you would see any improvement
>> at all, but it shouldn't make anything worse.
>>
>>

[-- Attachment #2: Type: text/html, Size: 3372 bytes --]

      reply	other threads:[~2020-01-07  0:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17  1:23 bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode Peter Ludemann
2019-12-17 13:59 ` Michael Albinus
2019-12-17 16:17 ` Eli Zaretskii
2019-12-17 18:27   ` Peter Ludemann
2019-12-17 19:30     ` Michael Albinus
2019-12-28 21:12       ` Peter Ludemann
2019-12-29 15:23         ` Michael Albinus
2020-01-04 18:50           ` Peter Ludemann
2020-01-05  9:28             ` Michael Albinus
2020-01-05 13:04 ` Mattias Engdegård
2020-01-05 19:31   ` Peter Ludemann
2020-01-05 19:57     ` Mattias Engdegård
2020-01-07  0:01       ` Peter Ludemann
2020-01-07  0:34         ` Peter Ludemann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHjfyZ1CHo-bOQ+q8VbJ2Ek0CB_N0YaxYrU1Xh7Aw2z=zTo_bA@mail.gmail.com' \
    --to=peter.ludemann@gmail.com \
    --cc=38644@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).