Open Arlodotexe opened 2 years ago
Since sparse collection population changes the count as it merges items, and getting items causes sparse collection population, it's easy to create a stack overflow by getting items inside the count changed event, like we ran into here for the Zune Desktop shell.
Overview
The
MergedCollectionMap
is a class which contains all of our logic for merging collections together. It's a very important part of the AdapterModel layer, where we merge many CoreModel instances into a single AppModel instance.The existing code for this was created in Nov 2020, and while it mostly works, after using it for a while we've found some improvements that need to be made.
General notes
ITrackCollection
,IAlbumCollection
,IImageCollection
, etc.ILibrary
,IArtist
orITrack
implement more than one collection interface.Brainstorm session 4/23/2022
The follow are notes from a brainstorm session between @Arlodotexe and @amaid on how to best handle the issues that arise from merging multiple collections into one collection.
Possible approaches
Sparse collection population
Full collection population (preload everything)
No need for sources changed event, sources are accurate before being returned, and would never changeRequired for adding/removing cores while app is running.Hybrid (background preload)
Questions
What to do