Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26051 > unrolled thread
| Started by | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| First post | 2012-07-25 23:57 +0000 |
| Last post | 2012-07-25 23:57 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: append in IMAP4 from imaplib very slow Antoine Pitrou <solipsis@pitrou.net> - 2012-07-25 23:57 +0000
| From | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| Date | 2012-07-25 23:57 +0000 |
| Subject | Re: append in IMAP4 from imaplib very slow |
| Message-ID | <mailman.2583.1343260695.4697.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web