emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clarification about auto-revert-mode and inotify


From: Stefan Monnier
Subject: Re: Clarification about auto-revert-mode and inotify
Date: Tue, 21 Oct 2014 23:20:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>> To me running this code 100 times per second sounds very expensive
>> CPU-wise.
> Any measurements to support that?

That's about 15% CPU use on my i7 laptop on my current session.
That corresponds to increasing the power consumption from 6.7W to 8.3W.

> Anyway, if 0.01 s is too expensive, you can always make it 0.2 s,
> which is also "instantaneous" in human reaction time terms, but is 20
> times less expensive CPU-wise.

That's better, indeed.  The other problem I see with just increasing the
timer frequency is the effect it has on those files not covered by
inotify (e.g. remote files).

>> I think that with inotify support, we should be able to handle
>> efficiently (i.e. with prompt refresh and with almost no CPU use when no
>> files are modified) a situation where the user enabled
>> global-auto-revert-mode with a 100 file buffers.
> You do remember that we actually watch the directory of the file, not
> the file itself, right?  And you do know how the inotify events are
> processed by Emacs, right?

I have no idea why that would matter.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]