Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: Process imap not running
Date: Thu, 17 Jan 2008 08:36:00 -0600	[thread overview]
Message-ID: <m27ii8ldtb.fsf@lifelogs.com> (raw)
In-Reply-To: <v9bq7lidvf.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Wed, 16 Jan 2008 23:50:44 +0100")

On Wed, 16 Jan 2008 23:50:44 +0100 Reiner Steib <reinersteib+gmane@imap.cc> wrote: 

RS> On Tue, Jan 15 2008, Ted Zlatanov wrote:
>> On Tue, 15 Jan 2008 00:27:48 +0100 Reiner Steib <reinersteib+gmane@imap.cc> wrote: 
>> 
RS> On Mon, Jan 14 2008, Simon Josefsson wrote:
>> 
>>>> It adds some unnecessary round-trips, but I guess we can live with
>>>> those.  Maybe there could be a variable to turn them off, but we can
>>>> always add that later if people want it.
>> 
RS> I added the variable `imap-ping-server', defaulting to t.  Please
RS> adjust if necessary.
>> 
>> I think it should be an integer, representing the minimum number of
>> seconds before it's triggered (or nil to turn it off).

RS> Is this feasible?  Would someone like to implement this?

I could do it eventually, but it's really not too hard.  Just make a
buffer-local timer in the imap buffer and check it every time if the
variable is not t.

>> The default should be nil.  When the IMAP server is far away, pinging
>> the server introduces a painful delay because of the TCP round trip.

RS> Could you explain how much delay it cause (and when)?  As it seems to
RS> fix a problem for several users, it would be nice to set it to t.

Remote TCP connections require an acknowledgment for every packet.  This
is alleviated by some optimizations to TCP itself (for example, you're
allowed to send more packets before you get an acknowledgment to the
first one), but it's a session-based reliable protocol so eventually you
have to wait for a confirmation back to know your packet made it.  If I
understand it correctly, the connection to the IMAP server is
synchronous, so any new commands in the queue will have to wait for the
ping to complete (since we don't start sending new IMAP commands until
the current one completes).  Thus a server 80ms away will introduce a
80ms delay twice per ping.  When you're on a slow link, or the network
is congested/miconfigured, or the server is far away, the delay will be
noticeable.

Of course, if the ping can happen in the background, that would not
block.  But we'd need parallel IMAP sessions or support for multiple
queued commands in one IMAP session, and imap.el doesn't support either
AFAIK.

Ted



  reply	other threads:[~2008-01-17 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06  9:38 Ralf Angeli
2008-01-10 12:19 ` Knut Anders Hatlen
2008-01-11 13:58   ` Andreas Jaeger
2008-01-14 19:12   ` Ralf Angeli
2008-01-14 20:33     ` Reiner Steib
2008-01-14 20:57       ` Simon Josefsson
2008-01-14 23:27         ` Reiner Steib
2008-01-15 21:08           ` Ted Zlatanov
2008-01-16 22:50             ` Reiner Steib
2008-01-17 14:36               ` Ted Zlatanov [this message]
2008-01-17 18:33                 ` Reiner Steib
2008-01-18  4:58                   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m27ii8ldtb.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).