[dev] IMP performance - cache mailbox sorts

Chuck Hagenbuch chuck at horde.org
Wed Apr 12 21:20:22 PDT 2006


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
- deletions/purges performed by imp/dimp unset indices in the cached  
sort automatically
- 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.

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. ;)

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris


More information about the dev mailing list