mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 22:38:51 +00:00
Wrapped tight loops inside a transaction to dramatically speedup things
Monotone-Parent: 4d37ced4d18a580dd453377f39144a265c8580cf Monotone-Revision: 34186beb96b4e03796e53fcc658539fd1c3dbb8a Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2011-08-31T18:11:09 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -496,6 +496,9 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||
fetchResults
|
||||
= [fetchResults sortedArrayUsingFunction: _compareFetchResultsByMODSEQ
|
||||
context: NULL];
|
||||
|
||||
ldb_transaction_start([[self context] connectionInfo]->oc_ctx);
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
result = [fetchResults objectAtIndex: count];
|
||||
@@ -519,6 +522,8 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||
lastModseq = modseq;
|
||||
}
|
||||
|
||||
ldb_transaction_commit([[self context] connectionInfo]->oc_ctx);
|
||||
|
||||
ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]];
|
||||
[currentProperties setObject: ti
|
||||
forKey: @"SyncLastSynchronisationDate"];
|
||||
|
||||
Reference in New Issue
Block a user