Hey, First of all, good job Laurent for the work on e-mail indexing :-) This patch isn't nearly as useful as his, but it fixes a couple of things in Tracker: 1. In tracker-inotify.c, changes to make code a little more readable, as well as fixing a couple of memory leaks when things go wrong, and using g_return_if_fail functionality for some checks (which gives us assertion warnings and can then be turned off for release builds, see next) 2. Make tracker make use of g_log and friends. This eventually allows us to report different levels of warnings with g_debug, g_message, g_warning, g_critical, etc. I basically did s/tracker_log/g_message/, so everything is reported as a message right now though. Reporting is done with log_handler in trackerd.c. 3. Finally, I was running tracker with strace and it was polling every 350 ms, keeping the CPU (a little, but still :-) busy. It was inotify watching for MOVED_FROM events that didn't have a corresponding MOVED_TO. Anyways, this function only needs to be called when a MOVED_FROM event is received, and can stop once a corresponding MOVED_TO is found. Now when there are no filesystem events, Tracker is completely idle :-). I wonder if Beagle can make that claim? ;-) Anyways, let me know if you want separate patches too. Cheers, Samuel Cormier-Iijima
Attachment:
fixes.patch
Description: Text Data