As AsParallel when filtering
This commit is contained in:
parent
6cefbdcdbf
commit
03a36d4628
|
@ -181,6 +181,8 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var items = GetItemsToSerialize(request, user);
|
||||
|
||||
items = items.AsParallel();
|
||||
|
||||
// Apply filters
|
||||
// Run them starting with the ones that are likely to reduce the list the most
|
||||
foreach (var filter in GetFilters(request).OrderByDescending(f => (int)f))
|
||||
|
@ -190,6 +192,8 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
items = ApplyAdditionalFilters(request, items);
|
||||
|
||||
items = items.AsEnumerable();
|
||||
|
||||
items = ApplySearchTerm(request, items);
|
||||
|
||||
items = ApplySortOrder(request, items, user);
|
||||
|
|
Loading…
Reference in New Issue
Block a user