Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26091
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: append in IMAP4 from imaplib very slow |
| Date | 2012-07-26 10:30 -0400 |
| References | <5010314F.80001@abusix.com> <5010B7B5.5040206@tim.thechases.com> <5010F689.8090701@abusix.com> <50110D14.7020906@abusix.com> <50113041.4010501@abusix.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2610.1343313046.4697.python-list@python.org> (permalink) |
On 7/26/2012 7:55 AM, Simon Pirschel wrote: > On 07/26/2012 11:25 AM, Simon Pirschel wrote: >> Ok, forget about the EXISTS and RECENT response. The server will >> response this way if you selected a mailbox, which I did in the Python >> code but not in the Perl code. I disabled selecting the mailbox in >> Python and there is no difference in the runtime. So, this isn't the >> issue. > > I solved the issue. The bad performance is caused by the socketopt > socket.TCP_NODELAY set to 0 by default. > > Request timing with socket.TCP_NODELAY=0: 0.0501310825348 seconds > Request timing with socket.TCP_NODELAY=1: 0.0027711391449 seconds > > This is a huge difference. Setting TCP_NODELAY=1 will bring the runtime > from 3:30 minutes down to 14 seconds! Not Perl speed, but close. Do you think this warrants a change in our docs, if not the code? -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: append in IMAP4 from imaplib very slow Terry Reedy <tjreedy@udel.edu> - 2012-07-26 10:30 -0400
csiph-web