Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode

From: Eli Zaretskii <[email-masked]>
Date: Tue, 17 Dec 2019 18:17:04 +0200

> From: Peter Ludemann <[email-masked]>
> Date: Mon, 16 Dec 2019 17:23:30 -0800
> 
> My hypothesis is that emacs is monitoring some files that it shouldn't

Emacs actually monitors the directory of every file whose buffer has
auto-revert-mode turned on, if you use file notifications for
auto-reverting (which is the default).

> When I run a CPU-bound job that also does quite a bit of I/O, emacs
> becomes very unresponsive -- running "top", I see CPU usage for emacs go
> into the 50-100% range.

Does "a bit of I/O" includes creating, deleting, or modifying files in
a directory where you have a file whose buffer has auto-revert-mode?

> As far as I know, I don't have any of the output files or directories
> open (I have global-auto-revert-mode set) -- all the outputs go into one
> directory and when I search the Buffer List, I don't see that
> directory.

Turn off auto-revert-use-notify and try again, would be my advice.