[dev] IMP performance - cache mailbox sorts
Michael M Slusarz
slusarz at horde.org
Thu Apr 13 07:36:43 PDT 2006
Quoting Chuck Hagenbuch <chuck at horde.org>:
> One of the biggest performance holdbacks we have in IMP is needing to
> re-sort mailboxes on every mailbox list. At least with c-client, I
> don't think there's any way to have a perfect "has the mailbox
> changed" check.
>
> So I'm wondering if we can come up with a "good enough" check. Here's
> what I'm thinking:
>
> - do an imap_status call on the mailbox. if there are "recent'
> messages, we know there's new mail we have to get
What about IMAP_Cache::?
> - deletions/purges performed by imp/dimp unset indices in the cached
> sort automatically
This should already be done in IMP_Mailbox::.
> - otherwise we save the sort for a period of time, like 30 seconds.
> not so long that changes made in other clients, etc. never show up,
> but long enough to speed up scrolling/paging through a mailbox
> quickly. this cache time is wide open for debate, of course. if Recent
> checks and updating on our own changes catch most updates, i can see
> it being more like 5 minutes.
This is definitely something proper for the config file.
> Obviously we'd check to see if the cache was still valid before doing
> the imap_status check since there's no need to run an imap_status if
> we're doing to re-sort anyway.
>
> Thoughts? Please poke holes in this if you see some, etc. Or if you're
> really inspired patches would be great. ;)
We still have to re-sort on any activity when using thread sort
regardless of any cache time given (since a deletion in a thread sort
can change the entire tree structure).
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list