Michael Albinus <michael.albinus@gmx.de> writes:
Hi Justin,
>> I mean it is certainly a bug to use 100% of a cpu just because a file
>> that is in the same directory to a file you are editing is being
>> written to, but it may not be unintentional behavior.
>
> I could reproduce the problem. I have a running Emacs for some days, and
> I've enabled `global-auto-revert-mode'. Starting scp copy of a large
> file outside Emacs, brought Emacs up to 100% cpu usage.
I have pushed a fix for this to Emacs' master branch in git. The case of
several buffers using the same file notification descriptor was prepared
already in the code; due to a silly bug it didn't work.
> The variable `file-notify-descriptors' contains ...
>
> As we can see, many identical entries #s(file-notify--watch
> /home/albinus nil auto-revert-notify-handler).
> Every incoming event for "/home/albinus" triggers the many calls of
> `auto-revert-notify-handler', although one entry would be sufficient. I
> will check, where all these entries come from.
This doesn't happen any longer for me. And Emacs doesn't eat all cpu
time.
Do you have a chance to build Emacs 27.0.50, for verification?
Best regards, Michael.