Re: GFileMonitor API improvments?



On Mon, Jun 16, 2008 at 6:45 AM, Martyn Russell <martyn imendio com> wrote:
> Hi all,
>
> For the Tracker project we need to know certain things when monitoring
> the file system depending on each backend used (inotify/fam/polling/etc).
>
> Currently if we use inotify, we check
> /proc/sys/fs/inotify/max_user_watches (which on my Ubuntu box is 8192)
> and we take that value and only allow monitors of 8192 - 500, that way
> other applications are able to still set monitors and Tracker doesn't
> steal 100% of the monitoring capacity.
>
> With FAM, we set the maximum to 400, simply for performance reasons.
>
> With Polling, again, we set the maximum to 100 for the performance
> reasons too.
>
> Currently we have no way with the new GFileMonitor API to know what
> backend we are using. Of course we could try using
> G_IS_INOTIFY_DIRECTORY_MONITOR() if that was made public but calling
> that EVERY time on each monitor is a bit much too.
>
> Would a patch to add an API which returns the file monitoring backend
> and the limit (if any) be accepted?
>

Can I suggest that it might be better for tracker to expose this as a
preference on its own, independent of the file monitoring backend used
by glib ?


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