On Wed, Nov 12, 2008 at 1:23 PM, A.L.E.C <[EMAIL PROTECTED]> wrote:
> I've made some investigation on messages searching. It was slow and
> memory expensive. I've found that we can use SORT on servers with that
> capability (r2046). Also searching with many criterias can be done in
> one command (r2044). So, in numbers my changes looks as follow:
>
> Searching in forder with 8200 messages, pagesize = 100.
>
> 1. Search for "aa" string in subject and from headers, returns 1 message:
> Now -     Time: 0.8 sec., Mem: 7.2 MB
> Before -  Time: 0.8 sec., Mem: 8.2 MB
> 2. Search for "aa" string in body, returns 2060 messages:
> Now -     Time: 2.1 sec., Mem: 8.6 MB
> Before -  Time: 5.5 sec., Mem: 21 MB
> 3. Search for "a" string in subject and from headers, returns 6090
> messages:
> Now -     Time: 1.1 sec.,  Mem: 11 MB
> Before -  Time: 11.8 sec., Mem: 46 MB
>
> So, it looks cool, but I'm not sure that all IMAP servers are supporting
> searching with SORT, so please do some tests.
>
> p.s. For IMAP servers without SORT capability we need still some work to
> do. See my comment (search for "TODO") in r2046.
>

Pretty impressive change. I take it SORT is advertised in the
capabilities, right? Do you have a list of imapd's who support this
command?

That's something we should add to the wiki - not a list of servers we
work with, but a recommendation thing since many people setup from
scratch and/or have no issues dropping one for another anyway. ;-)

RE: code, I'd like to sanitize $_SESSION, maybe use get_input_value()
(we need another constant for $_SESSION). I couldn't figure out where
you initialize them, is that in another diff (didn't see it in r2044
or r2046)?

Great work!

Till
_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to