From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53422 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Funny-looking code in imap.el Date: Mon, 14 Jul 2003 09:45:09 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <87znjhsw0d.fsf@cam.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1058169265 6203 80.91.224.249 (14 Jul 2003 07:54:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2003 07:54:25 +0000 (UTC) Original-X-From: ding-owner+M1966=ding+2Daccount=gmane.org@lists.math.uh.edu Mon Jul 14 09:54:24 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19byAC-0001be-00 for ; Mon, 14 Jul 2003 09:54:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19byB4-0005RR-00 for ding-account@gmane.org; Mon, 14 Jul 2003 02:55:18 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19byAz-0005RK-00 for ding@lists.math.uh.edu; Mon, 14 Jul 2003 02:55:13 -0500 Original-Received: (qmail 22438 invoked by alias); 14 Jul 2003 07:55:13 -0000 Original-Received: (qmail 22433 invoked from network); 14 Jul 2003 07:55:12 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by sclp3.sclp.com with SMTP; 14 Jul 2003 07:55:12 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.9/8.12.9) with ESMTP id h6E7tAkU006594 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Mon, 14 Jul 2003 09:55:11 +0200 Original-To: ding@gnus.org Mail-Copies-To: nobody X-Payment: hashcash 1.2 0:030714:ding@gnus.org:0a92daf975f291b8 X-Hashcash: 0:030714:ding@gnus.org:0a92daf975f291b8 In-Reply-To: <87znjhsw0d.fsf@cam.ac.uk> (Gaute B. Strokkenes's message of "Mon, 14 Jul 2003 03:05:38 +0100") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53422 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53422 Gaute B Strokkenes writes: > Having recently switched to using imap over ssl as a mail-source (as > opposed to fetchmail), I have been a bit annoyed at the amount of time > it can take to say `g' now that I have two extra imap-over-ssl > mail-sources. > > Looking at imap-ssl-open in imap.el: > > (while (and (memq (process-status process) '(open run)) > (set-buffer buffer) ;; XXX "blue moon" nntp.el bug > (goto-char (point-max)) > (forward-line -1) > (not (imap-parse-greeting))) > (accept-process-output process 1) > (sit-for 1)) > > I find the sit-for here rather surprising, though this bit of the > logic is duplicated in the other imap-foo-open functions, so it's > clearly not by mistake. The elisp manual states that the typical use > of sit-for is to give the user time to read a message; that doesn't > seem useful here. (The elisp manual also says that sit-for will wait > for the specified amount of time or "until there is input > available"--it's not clear whether this includes output from > subprocesses, but there is already a call to accept-process-output > anyway...) Is it the sit-for that delay things? Try removing it. Perhaps changing the a-p-o call to (accept-process-output process 0.1) would speed things up too.