[evolution-data-server/gnome-2-30] Improve imapx command queue processing
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-30] Improve imapx command queue processing
- Date: Mon, 28 Jun 2010 19:35:22 +0000 (UTC)
commit b256ad948135ee15c968cf7eb00c8a7e939952f9
Author: David Woodhouse <David Woodhouse intel com>
Date: Wed Jun 23 14:33:14 2010 +0100
Improve imapx command queue processing
We were breaking out of the loop which looked for commands to start on
the currently-selected folder, as soon as we reached any command which
was for any other folder.
This meant that we'd only ever run the _first_ command from the queue,
even if it was for another folder and there were other were other commands
with equal priority waiting to run on the _current_ folder. This leads to
a bunch of gratuitous ping-ponging between folders with SELECT, without
actually running any real commands between two consecutive SELECTs.
(cherry picked from commit e675fe58e36c546184dbb500723d518d864aa89c)
camel/providers/imapx/camel-imapx-server.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 1696a13..ef57f4d 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -906,8 +906,12 @@ imapx_command_start_next(CamelIMAPXServer *is, CamelException *ex)
camel_dlist_remove((CamelDListNode *)ic);
imapx_command_start(is, ic);
count++;
- } else
- break;
+ } else {
+ /* This job isn't for the selected folder, but we don't want to
+ consider jobs with _lower_ priority than this, even if they
+ are for the selected folder. */
+ pri = ic->pri;
+ }
ic = nc;
nc = nc->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]