[dev] IMP performance - cache mailbox sorts

Nuno Loureiro nuno at co.sapo.pt
Wed Apr 19 12:44:04 PDT 2006


On Apr 13, 2006, at 5:20, Chuck Hagenbuch wrote:

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

Do you know any IMAP command that does that that's not implemented in  
c-client? I'm just asking because the way I know can be done with c- 
client. If you do know we can't forget to implement it in the new  
imap extension. :-)

> 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

A combination of recent messages / total # of messages / uid validity  
(provided by imap_status()) and probably a "uid fetch lastseen+1:*"  
and "uid fetch 1:lastseen flags" would cover all issues no? I'm just  
thinking loud..


> - 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
>
> -- 
> Horde developers mailing list - Join the hunt: http://horde.org/ 
> bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org

----
Nuno Loureiro <nuno at co.sapo.pt>
DTP/APS/UNX - PT.COM - Portugal Telecom

PGP fingerprint = 8A32 5174 E80C 2D40 9075 405E C107 6592 054A 4D05
http://keyserver.noreply.org/pks/lookup? 
op=get&fingerprint=on&search=0xC1076592054A4D05

A: Top posters.
Q: What is the most annoying thing on Usenet?
http://scriptkitchen.com/godkills.jpg <-- please think of the kittens.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.horde.org/archives/dev/attachments/20060419/b02ee35f/PGP.bin


More information about the dev mailing list