Re: append in IMAP4 from imaplib very slow

Discussion in 'Python' started by Antoine Pitrou, Jul 26, 2012.

  1. Simon Pirschel <sp <at> abusix.org> writes:
    >
    > Hi,
    > I'm currently experimenting with IMAP using Python 2.7.3 and IMAP4
    > from imaplib. I noticed the performance to be very bad. I read 5000
    > files from a directory and append them to an IMAP INBOX. The hole
    > procedure of reading and appending is taking about 210 seconds.
    > I set up the exact same code in Perl to check if there is a general
    > IMAP server configuration issue, since CPU and I/O isn't the
    > problem. The same amount of data on the same IMAP server is done
    > after 7.9 seconds using Perl.
    > The difference is huge and I tried to narrow the issue down by
    > profiling the Python code.
    > The profile results are, 206 seconds are spent in calling
    > socket.recv.


    This just means that most of the time is spent waiting for the server to
    reply. Perhaps the Perl and Python IMAP libraries use different IMAP commands
    for appending?

    Regards

    Antoine.


    --
    Software development and contracting: http://pro.pitrou.net
    Antoine Pitrou, Jul 26, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HYRY
    Replies:
    10
    Views:
    584
    Bruno Desthuilliers
    Sep 26, 2007
  2. Alf P. Steinbach /Usenet

    Slow -- VERY slow brain

    Alf P. Steinbach /Usenet, Jun 16, 2011, in forum: C++
    Replies:
    17
    Views:
    497
    Noah Roberts
    Jun 29, 2011
  3. Nick Green
    Replies:
    4
    Views:
    180
    Nick Green
    Nov 18, 2009
  4. Tim Chase
    Replies:
    0
    Views:
    192
    Tim Chase
    Jul 26, 2012
  5. Terry Reedy
    Replies:
    0
    Views:
    204
    Terry Reedy
    Jul 26, 2012
Loading...

Share This Page