Comment 6 for bug 1416636

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The track is saved just before the destructor of the TrackInfo Object is called.
https://github.com/mixxxdj/mixxx/blob/e94a1a00e69a572166822e5a6990fc1edae98302/src/library/dao/trackdao.cpp#L53

Weak cache that controls that we have only one instance of a single track in Mixxx. If a track is not referenced, it is saved.
In addition we have a cache that a strong reference of 5 recently used tracks
This means we have always at least 5 unsaved and probably dirty tracks around. This number can be increase it we have more referenced tracks somewhere else in Mixxx.

During the solution of the bug, you may watch the size of the weak cache. We need to be sure, that it is at a reasonable size at any moment. If it is to high, we have a pending reference of an unused track, that prevents the track to be saved.

We may also discuss the sense of the strong cache. What is the benefit of it. If we just remove it any track is saved once it is not used. Is there a reason in the normal Mixxx workflow, that a track is used unused and used again short after?