diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-09-02 08:19:29 +0200 |
|---|---|---|
| committer | Anthony Lavado <anthonylavado@users.noreply.github.com> | 2019-09-02 02:19:29 -0400 |
| commit | ee637e8fecbcefe429babbbbd1325bce7c3fe991 (patch) | |
| tree | e3d76fb8d753dd43d8d0cff16e199b706ba84980 /Emby.Server.Implementations/Data | |
| parent | cb393c215a2ea75f61d0e3e798c6a4a596d720c2 (diff) | |
Fix warnings, improve performance (#1665)
* Fix warnings, improve performance
`QueryResult.Items` is now a `IReadOnlyList` so we don't need to
allocate a new `Array` when we have a `List` (and `Items` shouldn't need to
be mutable anyway)
* Update Providers .csproj to latest C#
* Remove extra newline from DtoService.cs
* Remove extra newline from UserLibraryService.cs
Diffstat (limited to 'Emby.Server.Implementations/Data')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index c3789eef2..2f083dda4 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -2746,7 +2746,7 @@ namespace Emby.Server.Implementations.Data var returnList = GetItemList(query); return new QueryResult<BaseItem> { - Items = returnList.ToArray(), + Items = returnList, TotalRecordCount = returnList.Count }; } @@ -2883,7 +2883,7 @@ namespace Emby.Server.Implementations.Data } LogQueryTime("GetItems", commandText, now); - result.Items = list.ToArray(); + result.Items = list; return result; } @@ -3161,7 +3161,7 @@ namespace Emby.Server.Implementations.Data var returnList = GetItemIdsList(query); return new QueryResult<Guid> { - Items = returnList.ToArray(), + Items = returnList, TotalRecordCount = returnList.Count }; } @@ -3281,7 +3281,7 @@ namespace Emby.Server.Implementations.Data LogQueryTime("GetItemIds", commandText, now); - result.Items = list.ToArray(); + result.Items = list; return result; } @@ -5520,7 +5520,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type result.TotalRecordCount = list.Count; } - result.Items = list.ToArray(); + result.Items = list; return result; } |
