perf(nextup): batch the user data reads the next episode selection makes
Next Up walked every series in an unpaginated loop and read user data one episode at a time, so the Home screen row cost two queries per series once the cache was gone. - read the played state of every candidate episode in one query - read the versions the resume check and the last played date need in one query each - default PrefetchedUserData on IUserBaseItemComparer so plugin comparers still compile - cover the bounded query count and the plugin comparer with tests - share one database across the replica tests
This commit is contained in:
@@ -33,8 +33,13 @@ namespace MediaBrowser.Controller.Sorting
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets user data for the items being sorted, keyed by item id, read once up front.
|
||||
/// A comparer that does not store it reads its user data one item at a time instead.
|
||||
/// </summary>
|
||||
/// <value>The prefetched user data, or <c>null</c> when none was prefetched.</value>
|
||||
IReadOnlyDictionary<Guid, UserItemData> PrefetchedUserData { get; set; }
|
||||
IReadOnlyDictionary<Guid, UserItemData> PrefetchedUserData
|
||||
{
|
||||
get => null;
|
||||
set { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user