[imp] message cache performance / parseAddressList

Michael M Slusarz slusarz at horde.org
Tue Aug 19 20:43:59 UTC 2008


Quoting Matthew Dunham <matthew.dunham at ic.ucsb.edu>:

> To open the worm can just a smidge more, Xdebug shows a similar  
> (albeit smaller) performance hit in IMP_Headers->getOb when viewing  
> individual messages. It would be great if the To/CC/Bcc addresses  
> displayed by message.php were run through the RFC822 validation  
> routines only once and then cached, rather than having each address  
> revalidated every time a message is viewed. Ought to result in a  
> somewhat snappier message UI.

You are correct - the bottleneck is in parseAddressList, not  
getFrom().  However, in IMP 4.2.x (and mimp/dimp), it would be  
extremely convoluted to try to BC address parsing caching (vs. address  
formatting caching) so we will stick with the formatting caching  
there.  In IMP HEAD, I have made the changes necessary to cache the  
results of running parseAddressList - the code can use this cached  
value wherever needed  - which happens on both the mailbox and message  
pages.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list