[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: PATCH : scoring
From: Michael =?iso-8859-1?q?H=E4ckel?= <Michael () Haeckel ! Net>
Date: 2001-04-10 14:16:26
[Download RAW message or body]
On Tuesday, 10. April 2001 14:18, Guillaume Laurent wrote:
>
> Yikes. I agree. I tried to find a better place where to score messages
> (presumably as they are read from a folder), but couldn't find one.
Well, the headers are always read, when a folder is selected. Only the
headers for inbox, outbox, sent-mail, trash and draft are always kept into
memory.
First of all you should not score messages at all, if there is no scoring
rule defined which affects the selected folder. That should at least cause no
slowdown for folders without scoring.
A possibility to make it faster is to only score the currently displayed
message in KMHeaderItem::paintCell. However this makes sorting according to
the score impossible.
Otherwise simply the algorithm has to become faster :-)
As far as I can see the score is only calculated out of headers and not out
of the message text. That can become _much_ faster, if you don't parse all
messages via mimelib into a KMMessage structure but read only the
interesting part directely out of the unparsed message. Assumed that the
operatins with the content of the headers in libkdenetwork are fast. You can
do that in exactely in the same way, as it is already done in
KMFldSearchRule::matches or you can move that 12 lines of code to a static
funtion in kmmessage.cpp to reuse it.
Regards,
Michael Häckel
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic