Hi everyone,

I've been struggling with very slow mailbox load times with previews enabled.  
I had a specific example using Horde 3.1.1 where it was fine and Horde 3.3.4 
where it would take 30 seconds or longer to load the mailbox.  There have been 
other threads and tickets opened on this.  Anyways, I finally tracked the 
problem down and implemented a fix that seems to work.

In /imp/lib/IMAP/MessageCache.php there is the following section of code:

if (String::length($ptext) > $maxlen) {
    $ptext = String::substr($ptext, 0, $maxlen) . ' ...';
    $cut = true;
}

Changing the code to

if (strlen($ptext) > $maxlen)
{
    $ptext = substr($ptext, 0, $maxlen);
    $cut = true;
}

solved the problem.  

It took me a ridiculously long time to find this.  I must have looked at this 
code a dozen times before finally deciding to start commenting out sections 
until it worked.

Hopefully this saves someone else some time.

Erik



      
-- 
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]

Reply via email to