Gnus development mailing list
 help / color / mirror / Atom feed
* pop3 *very* slow?
@ 1999-10-07 21:54 Dave Liebreich
  1999-10-08  0:14 ` Stainless Steel Rat
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Liebreich @ 1999-10-07 21:54 UTC (permalink / raw)


[apologies if this shows up twice]
[using pgnus-0.95 - I know I should go to .97]

I've set

(setq mail-sources
           '((pop :server "mailhost")))

and it's *very* slow.  Are the following lines in pop3.el really necessary?


       	;; bill@att.com ... to save wear and tear on the heap
	;; uncommented because the condensed version below is a problem for
	;; some.
	(if (> (buffer-size)  20000) (sleep-for 1))
	(if (> (buffer-size)  50000) (sleep-for 1))
	(if (> (buffer-size) 100000) (sleep-for 1))
	(if (> (buffer-size) 200000) (sleep-for 1))
	(if (> (buffer-size) 500000) (sleep-for 1))
	;; bill@att.com
	;; condensed into:
	;; (sometimes causes problems for really large messages.)
;	(if (> (buffer-size) 20000) (sleep-for (/ (buffer-size) 20000)))

And if pop just has to be slow, then does anyone have a working setup using
fetchmail that I can copy?  (I want to fetch the messages only when I
manually check for new mail; otherwise, I'd set up fetchmail/procmail to get
the mail in daemon mode and point gnus at a local spool file).

Thanks

_Dave



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop3 *very* slow?
  1999-10-07 21:54 pop3 *very* slow? Dave Liebreich
@ 1999-10-08  0:14 ` Stainless Steel Rat
  1999-10-08  2:11   ` Dave Liebreich
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stainless Steel Rat @ 1999-10-08  0:14 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Dave Liebreich <pixiebob@bigfoot.com>  on Thu, 07 Oct 1999
| and it's *very* slow.  Are the following lines in pop3.el really necessary?

One, yes, those sleeps are necessary.  Without them Emacs hangs on large
messages.

Two, the first sleep does not come up until the message being downloaded is 
~20kB.  By comparison, the average message on ding is between 4kB and 8kB,
less than half that initial threshold.  Given that, the 1-second pause a
20kB message incurs (and the 5-second pause a 500kB message causes) is
negligible.

Three, the Numero Uno cause of "slow" POP is not the client, but because
mail is being left on the server.  Every time you open your POP drop, the
server must make a copy of the spool file to properly lock it.  The larger
the spool file, the longer it takes to copy, and the slower your response
from the server will be.  Try deleting those messages if there are any and
see if that helps.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3/Tdqgl+vIlSVSNkRAuKVAJsF7GckxB1vsXqWewblJJSNIH9c8ACdFKby
222SoFb0YJx1D/VyWpJMrHw=
=nmnY
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ If Happy Fun Ball begins to smoke, get
Minion of Nathan - Nathan says Hi! \ away immediately. Seek shelter and cover
PGP Key: at a key server near you!  \ head.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop3 *very* slow?
  1999-10-08  0:14 ` Stainless Steel Rat
@ 1999-10-08  2:11   ` Dave Liebreich
  1999-10-08  5:17   ` Dave Liebreich
  1999-10-08 20:31   ` Greg Stark
  2 siblings, 0 replies; 7+ messages in thread
From: Dave Liebreich @ 1999-10-08  2:11 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> * Dave Liebreich <pixiebob@bigfoot.com>  on Thu, 07 Oct 1999
> | and it's *very* slow.  Are the following lines in pop3.el really necessary?
> 
> One, yes, those sleeps are necessary.  Without them Emacs hangs on large
> messages.

ok.

> Two, the first sleep does not come up until the message being downloaded is 
> ~20kB.

None of the messages are over 20kB.  All are quite a bit under 20kB.

> Three, the Numero Uno cause of "slow" POP is not the client, but because
> mail is being left on the server.

I don't leave the mail on the server.


I used the elp stuff and found that for a single short message, pop3-retr
was taking 3 seconds.

fetchmail on the same machine for the same message took < .5 seconds.

:-(

Thanks for the suggestions, though.

-Dave

p.s. just looked again at the code:

(while (not (re-search-forward "^\\.\r\n" nil t))
  (accept-process-output process 3)       
  ...
)

so that's where the 3 seconds comes from.  Is anyone else using this pop
function to get their mail, and if so, do you see each message take 3
seconds?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop3 *very* slow?
  1999-10-08  0:14 ` Stainless Steel Rat
  1999-10-08  2:11   ` Dave Liebreich
@ 1999-10-08  5:17   ` Dave Liebreich
  1999-10-08 23:24     ` Stainless Steel Rat
  1999-10-08 20:31   ` Greg Stark
  2 siblings, 1 reply; 7+ messages in thread
From: Dave Liebreich @ 1999-10-08  5:17 UTC (permalink / raw)


I steped through the function, and it looks like the first search for
'^.\r\n' fails because point is at the end of the buffer.  After sitting for
3 seconds (accept-process-output) and conditionally sleeping, there's a
(goto-char start) and the search succeeds.

I put a (goto-char start) before the while, and performance has improved
dramatically.

This makes sense to me, but I'm not strong in elisp coding - is this the
right fix?

-Dave

...
    (save-excursion
      (set-buffer (process-buffer process))
      (goto-char start)
      (while (not (re-search-forward "^\\.\r\n" nil t))
...



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop3 *very* slow?
  1999-10-08  0:14 ` Stainless Steel Rat
  1999-10-08  2:11   ` Dave Liebreich
  1999-10-08  5:17   ` Dave Liebreich
@ 1999-10-08 20:31   ` Greg Stark
  1999-10-08 23:26     ` Stainless Steel Rat
  2 siblings, 1 reply; 7+ messages in thread
From: Greg Stark @ 1999-10-08 20:31 UTC (permalink / raw)
  Cc: (ding)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> * Dave Liebreich <pixiebob@bigfoot.com>  on Thu, 07 Oct 1999
> | and it's *very* slow.  Are the following lines in pop3.el really necessary?
> 
> One, yes, those sleeps are necessary.  Without them Emacs hangs on large
> messages.

Are you sure this is still true? I know emacs will accept more input during
large reads and writes now, that was done to avoid deadlocks. how is your
deadlock occurring? I'm curious because having run into this once the hard way
I would like to know what other pitfalls threaten.


-- 
greg



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop3 *very* slow?
  1999-10-08  5:17   ` Dave Liebreich
@ 1999-10-08 23:24     ` Stainless Steel Rat
  0 siblings, 0 replies; 7+ messages in thread
From: Stainless Steel Rat @ 1999-10-08 23:24 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Dave Liebreich <pixiebob@bigfoot.com>  on Fri, 08 Oct 1999
| This makes sense to me, but I'm not strong in elisp coding - is this the
| right fix?

Depends on what might be in the buffer at the time.  I vaguely recall an
earlier version breaking when I tried exactly that.

Anyway, since I don't actively maintain the code anymore, you might want to 
take it up with RMS.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3/n0igl+vIlSVSNkRAvaLAJ4hChxuLkwQUSe9hnstu6BN+lQlSwCg+m2E
fi1pJbJDitQUKz66KA5OFbc=
=IKO0
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ Do not use Happy Fun Ball on concrete.
Minion of Nathan - Nathan says Hi! \ 
PGP Key: at a key server near you!  \ 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pop3 *very* slow?
  1999-10-08 20:31   ` Greg Stark
@ 1999-10-08 23:26     ` Stainless Steel Rat
  0 siblings, 0 replies; 7+ messages in thread
From: Stainless Steel Rat @ 1999-10-08 23:26 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Greg Stark <gsstark@mit.edu>  on Fri, 08 Oct 1999
| Are you sure this is still true?

Well, since the code will happilly run on Emacs 19, I believe so, yes.
But no, I cannot say for certain.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3/n2Kgl+vIlSVSNkRArK8AKDL0lG6Rfc7yKwUrFU0M8jWbDFiPACeLLkA
ex1mjRS4xIi5Ci6tsWWaZfs=
=PiNX
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ When not in use, Happy Fun Ball should be
Minion of Nathan - Nathan says Hi! \ returned to its special container and
PGP Key: at a key server near you!  \ kept under refrigeration.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-10-08 23:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-07 21:54 pop3 *very* slow? Dave Liebreich
1999-10-08  0:14 ` Stainless Steel Rat
1999-10-08  2:11   ` Dave Liebreich
1999-10-08  5:17   ` Dave Liebreich
1999-10-08 23:24     ` Stainless Steel Rat
1999-10-08 20:31   ` Greg Stark
1999-10-08 23:26     ` Stainless Steel Rat

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).