Comment 36 for bug 123460

Revision history for this message
Per Ångström (autark) wrote :

I have found it! Look at the following lines from rb-metadata-dbus-service.c:

#define ATTENTION_SPAN 30
...
electromagnetic_shotgun (gpointer data)
{
        ServiceData *c = (ServiceData *)data;
        GTime now = time(NULL);
        int idle = now - c->last_active;

        /* quit if we haven't done anything for a while */
        if (idle > ATTENTION_SPAN) {
                rb_debug ("shutting down (%ds idle)", idle);
                g_main_loop_quit (c->loop);
        }

        return TRUE;
}
...
        if (!svc.external)
                g_timeout_add_seconds (ATTENTION_SPAN / 2, (GSourceFunc) electromagnetic_shotgun, &svc);

No wonder all lengthy operations are cut off after 15 seconds!

Another observation: It seems that metadata-change operations are quicker and thus less error-prone when only a small collection is loaded. This suggests that the metadata-change background operation is hindered by Rhythmbox rescanning the collection while the operation is in progress.