[sylpheed:34678] Re: Sylpheed extremely slow while scanning folder
Ingo Strauch
brack at the-one-brack.org
Tue Jul 26 18:50:33 JST 2011
Hi all!
On Sat, 21 May 2011 16:42:22 +0200
Ingo Strauch <brack at the-one-brack.org> wrote:
> I often use sylpheed over an ssh connection plus X forwarding.
>
> Since a couple of days this got extremely slow. For example when I
> switch to another folder in the folder tree, sylpheed starts scanning
> the folder and I can see each number counted.
>
> Example: http://i.imgur.com/FXFRi.jpg
> When I took that screenshot it was at 41. And then came 42, 43, 44 ...
> all the way up to 5875.
>
> I can't say for sure but IIRC it happened after updating to sylpheed
> 3.1.1
I found some time to look deeper into the matter.
Here is the code that seems to be causing it (summaryview.c line 656):
-----
static void get_msg_list_func(Folder *folder, FolderItem *item,
gpointer data) {
SummaryView *summary = (SummaryView *)folder->data;
gint count = GPOINTER_TO_INT(data);
static GTimeVal tv_prev = {0, 0};
GTimeVal tv_cur;
g_get_current_time(&tv_cur);
if (tv_prev.tv_sec == 0 ||
(tv_cur.tv_sec - tv_prev.tv_sec) * G_USEC_PER_SEC +
tv_cur.tv_usec - tv_prev.tv_usec > 100 * 1000) {
gchar buf[256];
g_snprintf(buf, sizeof(buf), _("Scanning folder (%s) (%
d)..."), item->path, count);
STATUSBAR_POP(summary->mainwin);
STATUSBAR_PUSH(summary->mainwin, buf);
tv_prev = tv_cur;
}
}
-----
The output "Scanning folder..." is done at least every 0.1s as far as I
understand that code (100 * 1000 - in microseconds).
I compiled sylpheed again after changing that to "500 * 1000". Now it's
so fast, I can barely see the status message when using sylpheed over an
ssh connection.
Trying "200 * 1000" yields a somewhat unexpected behaviour: folders
with lets say around 500 messages are displayed fast enough so that I
don't see the scanning process counting upwards.
Folders with more than 500 messages are slow, but I can see the
scanning processing starting at 1 and counting up each individual
number. I had expected it to count maybe like 1, 501, 1001, etc.
So my fix works "all or nothing" which makes this status message rather
useless. I can live with that and patch each new version of sylpheed
for myself.
But maybe someone has an idea how to better improve on that behaviour?
Cheers,
Ingo
--
"What're quantum mechanics?"
"I don't know. People who repair quantums I suppose."
--Rincewind, Terry Pratchett "Eric"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://www.sraoss.jp/pipermail/sylpheed/attachments/20110726/97dc49fd/attachment.bin
More information about the Sylpheed
mailing list