aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-02-09 01:25:14 +0100
committerBond-009 <bond.009@outlook.com>2019-02-12 21:06:47 +0100
commit9dba930a85bc606840918639f4cd0b80c1e1eb2b (patch)
tree2ba797f6680230969d451770f72f144f4fcd2d1d
parent7722cb3ffab5b8330b34fb27608ba9ff35f6ce81 (diff)
Warn faster for slow requests
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 49a510a22..7e106569b 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -2710,13 +2710,11 @@ namespace Emby.Server.Implementations.Data
private void AddItem(List<BaseItem> items, BaseItem newItem)
{
- var providerIds = newItem.ProviderIds.ToList();
-
for (var i = 0; i < items.Count; i++)
{
var item = items[i];
- foreach (var providerId in providerIds)
+ foreach (var providerId in newItem.ProviderIds)
{
if (providerId.Key == MetadataProviders.TmdbCollection.ToString())
{
@@ -2741,10 +2739,10 @@ namespace Emby.Server.Implementations.Data
{
var elapsed = (DateTime.UtcNow - startDate).TotalMilliseconds;
- int slowThreshold = 1000;
+ int slowThreshold = 100;
#if DEBUG
- slowThreshold = 250;
+ slowThreshold = 10;
#endif
if (elapsed >= slowThreshold)