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);
|
var items = GetItemsToSerialize(request, user);
|
||||||
|
|
||||||
|
items = items.AsParallel();
|
||||||
|
|
||||||
// Apply filters
|
// Apply filters
|
||||||
// Run them starting with the ones that are likely to reduce the list the most
|
// 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))
|
foreach (var filter in GetFilters(request).OrderByDescending(f => (int)f))
|
||||||
|
@ -190,6 +192,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
|
|
||||||
items = ApplyAdditionalFilters(request, items);
|
items = ApplyAdditionalFilters(request, items);
|
||||||
|
|
||||||
|
items = items.AsEnumerable();
|
||||||
|
|
||||||
items = ApplySearchTerm(request, items);
|
items = ApplySearchTerm(request, items);
|
||||||
|
|
||||||
items = ApplySortOrder(request, items, user);
|
items = ApplySortOrder(request, items, user);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user