[dev] Performance issues with IMP git

Jan Schneider jan at horde.org
Thu Jan 8 18:26:50 UTC 2009


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>> Zitat von Michael M Slusarz <slusarz at horde.org>:
>>
>>> Quoting Jan Schneider <jan at horde.org>:
>>>
>>>> Does anybody else see really bad performance using IMP from git? I'm
>>>> talking about over 20 seconds for a page request, no matter whether
>>>> viewing a single message or a virtual folder.
>>>> Further analysis shows that most of the time (each around 40%) is
>>>> spent in fgets() and feof() called from
>>>> Horde_Imap_Client_Socket::_getLine(). From message.php they are called
>>>> 38/36 times, from my virtual inbox 404/372 times.
>>>
>>> Nope - instantaneous for me.  (I'm glad to get feedback, though. I
>>> kind of figured the code wasn't perfect :) )
>>>
>>> fgets/feof should be called that many times - those functions should
>>> be called once for every line of input read from the stream.  Maybe
>>> there's an issue with stream blocking on your system - possibly play
>>> around with socket_set_blocking() and see if that fixes things(?)
>>
>> Further digging showed that almost 99% of this delay seems to be
>> caused by imap requests from the login methods. Using the
>> test_client.php from framework returns instantaneously though.
>
> Have you turned on IMAP debug logging (great new feature in IMP 5!)?  
>  To dump to a text file, simply add:
> 'debug' => 'path_to_filename'
> in imp/config/servers.php.

Yes, I already did this and also added timestamps to the log message.  
Blocking/non-blocking doesn't make a difference, authentication always  
takes exactly 10 seconds. Does that ring a bell? Here's a typical log  
excerpt:

S (1231438991,2811): * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID  
STARTTLS AUTH=PLAIN SASL-IR] neo Cyrus IMAP4 v2.3.11 server ready
C (1231438991,2817): 1 AUTHENTICATE PLAIN
S (1231438991,2818): +
C (1231439011,2861): [AUTHENTICATE Command]
S (1231439011,4143): 1 OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID  
LOGINDISABLED ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE  
UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT  
SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE  
CATENATE CONDSTORE IDLE X-NETSCAPE URLAUTH] Success (no protection)
C (1231439011,4542): 2 EXAMINE "INBOX"
S (1231439011,4548): * FLAGS (\Answered \Flagged \Draft \Deleted \Seen  
NonJunk $Label2 $Label1 $Label3 $Label4 $Label5 Junk $Forwarded  
NotJunk foo AMMMa Consulting $NotJunk JunkRecorded $Junk Training  
$MDNSent KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $TODO  
$WATCHED $IGNORED)
S (1231439011,4562): * OK [PERMANENTFLAGS ()]
S (1231439011,4564): * 77 EXISTS
S (1231439011,4566): * 0 RECENT
S (1231439011,4568): * OK [UNSEEN 67]
S (1231439011,4569): * OK [UIDVALIDITY 968256253]
S (1231439011,457): * OK [UIDNEXT 194879]
S (1231439011,4571): * OK [NOMODSEQ] Sorry, modsequences have not been  
enabled on this mailbox
S (1231439011,4572): * OK [URLMECH INTERNAL]
S (1231439011,4573): 2 OK [READ-ONLY] Completed

...

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list