Bug 318686 - Startup synchronization should wait till all collections have been loaded
Summary: Startup synchronization should wait till all collections have been loaded
Status: CONFIRMED
Alias: None
Product: amarok
Classification: Applications
Component: Tools/Statistics Synchronization (show other bugs)
Version: 2.8.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: later
Assignee: Amarok Developers
URL:
Keywords:
Depends on: 336380
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-21 20:30 UTC by Karthik Periagaram
Modified: 2014-08-12 08:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karthik Periagaram 2013-04-21 20:30:48 UTC
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.
Comment 1 Matěj Laitl 2013-04-22 12:52:11 UTC
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).