Re: [Tracker] couple of fixes



OK, I've split this up into two patches, and got rid of changing all
of the tracker_logs to g_messages. So now, tracker_log is just a macro
that expands to g_message. inotify.patch is the patch for numbers 1
and 3. Cheers,
Samuel Cormier-Iijima

On 9/20/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
Samuel Cormier-Iijima wrote:
> 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)

okay

>
> 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.

fine with me in principal

>
> 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? ;-)
>

great - I had been meaning to do this

> Anyways, let me know if you want separate patches too.
>
yes  please

No (2) will have to wait for a good moment as I have more code thet uses
tracker-log and so does Laurent.

Perhaps we can have tracker-log in there that calls g_message?

Maybe using a preprocessor macro so tracker_log maps to g-message? (im
not sure if they can handle varargs?)

In any event well done :)

jamie.


Attachment: inotify.patch
Description: Text Data

Attachment: logging.patch
Description: Text Data



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