Commit a9185461 authored by Jim Nelson's avatar Jim Nelson

Allow flag watching while synchronizing folder in background

Previously, synchronizing folders caused a jump in CPU, so work was
done to minimize activity.  Optimizations to folder normalization
has reduced the CPU load, so it's okay now to allow flag watching
while the background folder is open.

This is not a substitute for an architected solution: periodic
flag synchronization with folders, not merely when changes in contents
(additions/removals) are detected, but this helps some, especially
with high-traffic folders.
parent 70aafd75
......@@ -306,10 +306,6 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
return true;
}
// turn off the flag watcher whilst synchronizing, as that can cause addt'l load on the
// CPU
folder.email_flag_watcher.enabled = false;
try {
yield sync_folder_async(folder, epoch, oldest_local, oldest_local_id);
} catch (Error err) {
......@@ -319,8 +315,6 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
debug("Error background syncing folder %s: %s", folder.to_string(), err.message);
// fallthrough and close
} finally {
folder.email_flag_watcher.enabled = true;
}
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment