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:
@@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user