[Top][All Lists]

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

Re: [Emacs-diffs] master 8c909d7: * src/gfilenotify.c (Fgfile_add_watch)

From: Michael Albinus
Subject: Re: [Emacs-diffs] master 8c909d7: * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate.
Date: Thu, 24 Sep 2015 22:52:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>     * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate.
> Decreasing the rate means increasing the interval.  From the "800 msec"
> comment I get the impression that the patch reduces the interval, and
> hence increases the rate.
> Which one is it?  And why do we need/want to do that (i.e. could you
> add a comment pointing the to a discussion or something)?

It is the polling rate gio (glib) checks for changes of a file, once it
has been set up to be monitored, and there is no native library like
inotify or kqueue which send a changed event w/o need to poll. See

I've changed this, because typically users of filemonitor.el use
(read-event nil nil 0.1) when they are waiting for a file notification event.

I don't believe it will be a performance issue, because most of the uses
Emacs is based on non-polling file notifications. Either inotify or
w32notify directly, of gfilenotify with built-in inotify or kqueue.

Maybe it's worth to make it configurable? Don't know.

>         Stefan

Best regards, Michael.

reply via email to

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