unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Peter Ludemann <peter.ludemann@gmail.com>
Cc: 38644@debbugs.gnu.org
Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode
Date: Sun, 29 Dec 2019 16:23:46 +0100	[thread overview]
Message-ID: <877e2fm9z1.fsf@gmx.de> (raw)
In-Reply-To: <CAHjfyZ0od_WLvW+YF4M0Hsp5M+3iARWKhUuNYG-iaTHhji8iEw@mail.gmail.com> (Peter Ludemann's message of "Sat, 28 Dec 2019 13:12:24 -0800")

Peter Ludemann <peter.ludemann@gmail.com> 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.





  reply	other threads:[~2019-12-29 15:23 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 [this message]
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

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=877e2fm9z1.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=38644@debbugs.gnu.org \
    --cc=peter.ludemann@gmail.com \
    /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).