[Users] Compound search is very slow

Steve Litt slitt at troubleshooters.com
Thu Jun 30 00:10:33 CEST 2016


On Wed, 29 Jun 2016 13:17:15 -0700, Dave Stevens <geek at uniserve.com>
wrote:
> On Wed, 29 Jun 2016 14:11:42 -0400
> Steve Litt <slitt at troubleshooters.com> wrote:
> 
> > Hi all,
> > 
> > I'm talking about the search field appearing just below the message
> > list and just above the single message box, and I'm talking about
> > its leftmost dropdown set at "extended".
> > 
> > Perform the following search:
> > 
> > al 1 & b through
> > 
> > If your situation is anything like mine, this will take far, far
> > longer than just al 1 (date is indexed and is selected immediately),
> > and subjectively a lot longer than you'd imagine it should take to
> > search the bodies of today's and yesterday's emails.
> > 
> > I haven't looked at the code, but I have a feeling it's (slow)
> > body-searching a lot more messages than just those selected by al 1.
> > 
> > How hard would it be for these extended searches to select left to
> > right, so the user can select by indexed values before unindexed
> > values?
> > 
> > Thanks,
> > 
> > SteveT  
> 
> On my old slow Toshiba Satellite it took about a second or two to find
> no matches in a thousand emails.

Thanks Dave,

I forgot to mention in my symptom description that if the b string is
something that's not in any of those that passed al, it will be the
same speed as al. Which is bizarre: I wouldn't know how to write an
algorithm that could guess whether before beginning to count.

Liz mentioned that it was quick to find 2, so I looked in more detail,
given that my main inbox al 1 & b the took about 20 seconds.

Well, it turns out that first, my inbox is a local Dovecot server, and
second, I have my Claws set to not immediately move deleted to trash:
It just marks them deleted.

It turns out on my box al 1 yields 148 emails of all different sizes,
both deleted and undeleted, both younger than 2 days and in the future
by days or years.

Interestingly, I can reduce the group to deleted only by using the D
operator in the search, but there's no equivalent for UNdeleted.
There's also no way to say age between 0 and 1: If you say less than 1,
it gets all negative ages too.

It would be handy if the following search criteria could be added:

d for NOT deleted.

ap for age positive

an for age negative

But of course the not operator (~ or !) pretty much gives those
capabilities.

So when I did:

~D & al 1 & the

My inbox took only about 11 seconds and pulled up 14 messages, as
opposed to pulling up 152 messages without the ~D (but taking not much
longer).

I'll look into it more, but for now I'm assuming my slow searching is
caused by:

1) I was searching a lot of deleted messages I didn't know about.

2) I don't immediately expunge deleted messages.

3) My account is via Dovecot IMAP, not a local MH folder

4) I have a feeling the algorithm to search in bodies is somewhat slow.

Thanks everyone!

SteveT

Steve Litt 
== Whose business shall never be mentioned on the Claws-Mail List ==



More information about the Users mailing list