When amarok is started, it begins synchronizing statistics even if the other collections have not been fully read into amarok. This is noticeable with a library of about 8000 songs when I have both the local collection and the nepomuk collection enabled. The synchronization begins even though the nepomuk collection hasn't been fully loaded. Reproducible: Always Steps to Reproduce: 1. Enable nepomuk collection, statistics synchronization. 2. Restart amarok. Actual Results: Synchronization starts and finishes before the nepomuk collection has been read into amarok. Expected Results: The synchronization should not start until all the collections have been fully read into amarok.
I acknowledge this problem. The StatSyncing framework currently has some heuristics to wait for collections to settle down. (if a collection emits updated() signal at least once in 5s, it is considered still loading) However that heuristics don't work for current NepomukCollection, which does the import in batch (and perhaps neither for the Local Collection on the very first run). A proper solution would be to introduce better state (loading, idle ...) tracking for collections, on the other hand the NepomukCollection is going to be refactored in a way that it shows all tracks right from the beginning (and fetches the needed metadata on demand).