Commit resync writes in one transaction

Each insert, delete and rescore update was its own commit to disk, so a
resync of about a thousand QSOs froze the window thread. LogStore has a
new Batch() scope that commits its writes together. ContestSession uses
it in AddRangeFromNetwork, ClearFromNetwork and Rescore.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 11:01:05 +00:00
co-authored by Claude Sonnet 5.5
parent 36af4340cf
commit 826aa0ef97
4 changed files with 43 additions and 8 deletions
@@ -57,7 +57,16 @@ public sealed class FakeLogStore : LogStore
public void Delete(string id) => qsos.RemoveAll(q => q.Id == id);
public IDisposable Batch() => new NoBatch();
public void Dispose()
{
}
private sealed class NoBatch : IDisposable
{
public void Dispose()
{
}
}
}