all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 8c909d7: * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate.
       [not found] ` <E1Zf14z-0004IK-RX@vcs.savannah.gnu.org>
@ 2015-09-24 12:26   ` Stefan Monnier
  2015-09-24 20:52     ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2015-09-24 12:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: Michael Albinus

>     * 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)?


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] master 8c909d7: * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate.
  2015-09-24 12:26   ` [Emacs-diffs] master 8c909d7: * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate Stefan Monnier
@ 2015-09-24 20:52     ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2015-09-24 20:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> 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
<https://developer.gnome.org/gio/stable/GFileMonitor.html#g-file-monitor-set-rate-limit>

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-24 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150924073633.16471.60525@vcs.savannah.gnu.org>
     [not found] ` <E1Zf14z-0004IK-RX@vcs.savannah.gnu.org>
2015-09-24 12:26   ` [Emacs-diffs] master 8c909d7: * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate Stefan Monnier
2015-09-24 20:52     ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.