mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 12:58:50 +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:
@@ -226,6 +226,8 @@
|
||||
max = [fetchResults count];
|
||||
if (max > 0)
|
||||
{
|
||||
ldb_transaction_start([[self context] connectionInfo]->oc_ctx);
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
result = [fetchResults objectAtIndex: count];
|
||||
@@ -260,7 +262,9 @@
|
||||
lastModificationDate = cLastModified;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ldb_transaction_commit([[self context] connectionInfo]->oc_ctx);
|
||||
|
||||
if (foundChange)
|
||||
{
|
||||
ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]];
|
||||
|
||||
Reference in New Issue
Block a user