Re: CPU on filtered messages



On 01/21/2005 02:02:15 PM, Andrew Conkling wrote:
Lately, I've been noticing that when I receive a message, it takes a while for its filter to apply. Currently, I have 6 filters in use. The largest folder to which a message might be directed has 1300 messages therein. I'm pretty sure that my mailboxes are mbox-style.

Does anyone know why this could be happening?

I know why: the matching algorithm in libbalsa/mailbox_local.c is, well, suboptimal. The filters are done using conditions like this:


IF(RECENT AND field is "XXX") Then yyy

but the filtering code does not take advantage of the fact that recent flag is much faster to evaluate and check by the brute force everything.

We should instead check the flags first and do the more expensive tests on messages that actually can match....

Pawel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]