Re: [Tracker] New command line tool tracker-files

Gergan Penkov wrote:
On Wed, 02 Aug 2006 16:22:15 +0100
Jamie McCracken <jamiemcc blueyonder co uk> wrote:

I have added another command line tool "tracker-files" to cvs

This can be used to retrieve all files of a service type or a mime

EG to return all files in service music:
tracker-files -s music

to return all jpg files:
tracker-files -m image/jpeg

it is working just great here, thank you for your hard work on
I have a small problem again :) could the dbus-interface be started a
little bit earlier, from I could gather from fast skimming the source,
probably this is the culprit:
/* periodically poll directories for changes */ g_timeout_add_full (G_PRIORITY_LOW, FILE_POLL_PERIOD, (GSourceFunc) start_poll, NULL, NULL

        loop = g_main_loop_new (NULL, TRUE);

        main_connection = tracker_dbus_init ();

not really. The timeout function is added to the mainloop and gets called periodically as a low priority item (every 15 minutes it polls) so there is no actual delay in starting the dbus interfaces.

You can freely search or whatever while it polls/indexes or watches files.

The problem I have is that I've added not only my home, but also some
external dirs, although my home directory alone would give also a hard
time to tracker - it depletes all the inotify watches and begins
polling, with the current setup with more than 7800 polls over the
watches (but it will be not that different with only my home), so the
real problem is that it needs quite a lot of time to begin
responding to the dbus requests.

I have hardcoded the poll frequency at 15 minute intervals. This is probably too short for 7000+ directories so it would probably be continuously polling and slowing down the main thread (and consequently delaying requests to the dbus interface)

I could make the poll interval hourly if that would help?

If I were you I would only watch the most frequently changing directories as you can call trackerd directory to index indiviudal branches

Also set NoWatchDirectories in ~/.Tracker/tracker.cfg to a list of roots that you dont want watched.

Hopefully longer term we will get kernel support for recursively watching log files for file changes to the entire FS and do away with polling and watches all together

Mr Jamie McCracken

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