diff --git a/src/FilterLists.Services/Snapshot/Snapshot.cs b/src/FilterLists.Services/Snapshot/Snapshot.cs index 1e6351e6e..e2857cf11 100644 --- a/src/FilterLists.Services/Snapshot/Snapshot.cs +++ b/src/FilterLists.Services/Snapshot/Snapshot.cs @@ -15,7 +15,7 @@ namespace FilterLists.Services.Snapshot { public class Snapshot { - private const int BatchSize = 250; + private const int BatchSize = 1000; private readonly FilterListsDbContext dbContext; private readonly FilterListViewUrlDto list; private readonly Data.Entities.Snapshot snapEntity; diff --git a/src/FilterLists.Services/Snapshot/SnapshotBatch.cs b/src/FilterLists.Services/Snapshot/SnapshotBatch.cs index a1af7099e..6272480b4 100644 --- a/src/FilterLists.Services/Snapshot/SnapshotBatch.cs +++ b/src/FilterLists.Services/Snapshot/SnapshotBatch.cs @@ -33,7 +33,7 @@ public async Task SaveAsync() } private IQueryable GetExistingRules() => - dbContext.Rules.Join(lines, rule => rule.Raw, line => line, (rule, line) => rule); + dbContext.Rules.Where(r => lines.Contains(r.Raw)); private List CreateNewRules(IQueryable existingRules) => lines.Except(existingRules.Select(r => r.Raw)).Select(r => new Rule {Raw = r}).ToList();