Re: [Tracker] Don't crawl directories after start



Theo Wollenleben wrote:
Am Samstag, 11. April 2009 17:53:46 schrieb Ivan Frade:
 Tracker needs that initial crawling to know if something have change while
tracker wasn't running and set the monitors on the folders. Take into
account that tracker is just "crawling" and not reindexing the content of
the files. It is just comparing the last-modification-date of the
files/folders with the "index-time", so if there is no change, the files
are not indexed/extracted/analyzed again.

 There is no way to disable _only_ the crawling and keep the monitoring
using options. You could still modify the code to adapt it to your
requirements.

Does this mean the code can be changed such that monitoring without initial scan is possible? In the meantime I found [http://bugzilla.gnome.org/show_bug.cgi?id=502875], where Jamie McCracken claims that crawling is necessary and it is a flaw of inotify. Is that true? I used beagle for a while, which uses inotify to watch files without initial hammering of the disk.

He is right. Inotify was designed to watch specific directories. Consider the case where you want to watch ALL files under directory X, in that situation (right now) you have to recursively crawl the file system and add watches on all directories there. If inotify would allow us to just watch $HOME (i.e. X) we would be better off here of course.

However, that's one part of the problem, You should also know that we still need to get directory listings because we have to stat() the directory for its mtime to compare it to what we have in the database to know if we should check individual files in that directory. Also, the mtime on a directory doesn't update recursively up the tree, only the immediate parent directory mtime is changed, so crawling is absolutely necessary. We could of course add an option to only do this the first time round, but then you risk not tracking data if something crashes or anything is changed outside the run time operation of Tracker as Ivan says.

--
Regards,
Martyn



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