Re: Is it a bug in Gio::FileMonitor?

On Fri, 2010-05-28 at 20:37 +0300, Владимир wrote:
> Hi,
> I've been told on the gtkmm mailing lists that it's a glib/gio issue
> (or feature) so I should ask here because gtkmm is just "a thin
> wrapper".
> I found that Gio::FileMonitor reports changes (like
> created/deleted/etc) to files with a delay of around 1 to 2 seconds
> and its method set_rate_limit() doesn't make a difference.
> I'm wondering whether it's a bug or a feature?
> Also, I tried Linux's "inotify" and it works well, that is, it reports
> changes instantly. 

There are some delays and stuff inside the inotify backed to try to e.g.
coalesce delete+create pairs to moves and to generally get better
performance by not running constantly on every single event. However,
i'm not sure what exact timeouts are used, as I don't know the inotify
part of the code all that well.

However, in general you can't depend on instant feedback from the gio
file monior in general. On some systems this is not possible, for
instance we might be falling back to polling if no native file
notification system exists.

 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a fiendish overambitious werewolf for the 21st century. She's an orphaned 
winged mercenary who dreams of becoming Elvis. They fight crime! 

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