Gnus development mailing list
 help / color / mirror / Atom feed
* WTF, sleep-for?
@ 1997-11-27 10:53 Hrvoje Niksic
  1997-11-27 13:57 ` Lars Magne Ingebrigtsen
  1997-11-27 14:56 ` Thor Kristoffersen
  0 siblings, 2 replies; 11+ messages in thread
From: Hrvoje Niksic @ 1997-11-27 10:53 UTC (permalink / raw)


I noticed that quitting Gnus has become noticably slower -- whereas
pressing `q' used to be fast, I now have to wait more than a second
for the Group buffer to disappear.

After sharping the profiling routines, what do I discover?  That the
time is being spent in a `sleep-for', presumably this one:

[... nntp-close-server ...]
	(ignore-errors
	  (nntp-send-string process "QUIT")
	  (sleep-for 1)))

Is there a reason for this?

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!!


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

* Re: WTF, sleep-for?
  1997-11-27 10:53 WTF, sleep-for? Hrvoje Niksic
@ 1997-11-27 13:57 ` Lars Magne Ingebrigtsen
  1997-11-27 16:32   ` Jan Vroonhof
  1997-11-27 14:56 ` Thor Kristoffersen
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-11-27 13:57 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

> After sharping the profiling routines, what do I discover?  That the
> time is being spent in a `sleep-for', presumably this one:
> 
> [... nntp-close-server ...]
> 	(ignore-errors
> 	  (nntp-send-string process "QUIT")
> 	  (sleep-for 1)))
> 
> Is there a reason for this?

If you `delete-process' an rsh process, it will most likely die before
this QUIT arrives, which means that the NNTP server will keep its
connection open until it dies of boredom.  Which is naughty.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: WTF, sleep-for?
  1997-11-27 10:53 WTF, sleep-for? Hrvoje Niksic
  1997-11-27 13:57 ` Lars Magne Ingebrigtsen
@ 1997-11-27 14:56 ` Thor Kristoffersen
  1997-11-27 15:00   ` Hrvoje Niksic
  1997-11-27 16:04   ` Jan Vroonhof
  1 sibling, 2 replies; 11+ messages in thread
From: Thor Kristoffersen @ 1997-11-27 14:56 UTC (permalink / raw)


Hrvoje Niksic writes:
> [... nntp-close-server ...]
> 	(ignore-errors
> 	  (nntp-send-string process "QUIT")
> 	  (sleep-for 1)))
> 
> Is there a reason for this?

If you connect to the news server with `nntp-open-rlogin' (or a
similar method) you have to make sure that the "QUIT" makes it to the
news server before you kill the connection, otherwise the
telnet-process on the other server won't terminate.

An improvement would be to check `nntp-open-connection-function' and
(sleep-for 1) only when necessary.


Thor
-- 
Thor Kristoffersen


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

* Re: WTF, sleep-for?
  1997-11-27 14:56 ` Thor Kristoffersen
@ 1997-11-27 15:00   ` Hrvoje Niksic
  1997-11-27 16:34     ` Lars Magne Ingebrigtsen
  1997-11-27 16:04   ` Jan Vroonhof
  1 sibling, 1 reply; 11+ messages in thread
From: Hrvoje Niksic @ 1997-11-27 15:00 UTC (permalink / raw)


Thor Kristoffersen <thor@unik.no> writes:

> If you connect to the news server with `nntp-open-rlogin' (or a
> similar method) you have to make sure that the "QUIT" makes it to the
> news server before you kill the connection, otherwise the
> telnet-process on the other server won't terminate.

This is very annoying for those of us who don't use
`nntp-open-rlogin'.  As you continue:

> An improvement would be to check `nntp-open-connection-function' and
> (sleep-for 1) only when necessary.

Lars, could you *please* conditionalize the `sleep-for'?

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Which is worse: ignorance or apathy?  Who knows?  Who cares?


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

* Re: WTF, sleep-for?
  1997-11-27 14:56 ` Thor Kristoffersen
  1997-11-27 15:00   ` Hrvoje Niksic
@ 1997-11-27 16:04   ` Jan Vroonhof
  1997-11-27 16:34     ` Thor Kristoffersen
  1 sibling, 1 reply; 11+ messages in thread
From: Jan Vroonhof @ 1997-11-27 16:04 UTC (permalink / raw)


Thor Kristoffersen <thor@unik.no> writes:

> If you connect to the news server with `nntp-open-rlogin' (or a
> similar method) you have to make sure that the "QUIT" makes it to the
> news server before you kill the connection, otherwise the
> telnet-process on the other server won't terminate.

Why? Won't it be killed automatically when the connection is closed?
Sure seems to work like that here.

Jan


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

* Re: WTF, sleep-for?
  1997-11-27 13:57 ` Lars Magne Ingebrigtsen
@ 1997-11-27 16:32   ` Jan Vroonhof
  1997-11-27 19:03     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Vroonhof @ 1997-11-27 16:32 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> If you `delete-process' an rsh process, it will most likely die before
> this QUIT arrives, which means that the NNTP server will keep its
> connection open until it dies of boredom.  Which is naughty.

isn't it better to also have an nntp-close-connection-function which
waits for "Remote dropped connection" or something like that.
The timeout seem rather arbitrary.

Jan


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

* Re: WTF, sleep-for?
  1997-11-27 15:00   ` Hrvoje Niksic
@ 1997-11-27 16:34     ` Lars Magne Ingebrigtsen
  1997-11-27 19:53       ` Felix Lee
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-11-27 16:34 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

> > An improvement would be to check `nntp-open-connection-function' and
> > (sleep-for 1) only when necessary.
> 
> Lars, could you *please* conditionalize the `sleep-for'?

Yup.  Fix in Quassia Gnus v0.18.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: WTF, sleep-for?
  1997-11-27 16:04   ` Jan Vroonhof
@ 1997-11-27 16:34     ` Thor Kristoffersen
  1997-11-28 10:45       ` Jan Vroonhof
  0 siblings, 1 reply; 11+ messages in thread
From: Thor Kristoffersen @ 1997-11-27 16:34 UTC (permalink / raw)


Jan Vroonhof writes:
> > If you connect to the news server with `nntp-open-rlogin' (or a
> > similar method) you have to make sure that the "QUIT" makes it to the
> > news server before you kill the connection, otherwise the
> > telnet-process on the other server won't terminate.
> 
> Why? Won't it be killed automatically when the connection is closed?
> Sure seems to work like that here.

Sheer luck.  I wasn't so lucky, though; not long ago one system
administrator kindly pointed out to me that I had about 30 old telnet
processes lying around on a heavily loaded server.  They were all left
there by `nntp-open-rlogin'.


Thor
-- 
Thor Kristoffersen


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

* Re: WTF, sleep-for?
  1997-11-27 16:32   ` Jan Vroonhof
@ 1997-11-27 19:03     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-11-27 19:03 UTC (permalink / raw)


Jan Vroonhof <vroonhof@math.ethz.ch> writes:

> isn't it better to also have an nntp-close-connection-function which
> waits for "Remote dropped connection" or something like that.

Yes, that would perhaps be better, but in most cases (that is, when
using the normal connection function) just sending a QUIT and killing
the process gets the job done -- and done very quickly from a user
standpoint.  Waiting to see if the link is actually dropped by the
server can sometimes take a while -- and if the IP address of the
machine has changed, then it'll take forever.

> The timeout seem rather arbitrary.

Yup.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: WTF, sleep-for?
  1997-11-27 16:34     ` Lars Magne Ingebrigtsen
@ 1997-11-27 19:53       ` Felix Lee
  0 siblings, 0 replies; 11+ messages in thread
From: Felix Lee @ 1997-11-27 19:53 UTC (permalink / raw)


> > > An improvement would be to check `nntp-open-connection-function' and
> > > (sleep-for 1) only when necessary.
> > Lars, could you *please* conditionalize the `sleep-for'?

or else you could wait for the 205 response to the QUIT
--


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

* Re: WTF, sleep-for?
  1997-11-27 16:34     ` Thor Kristoffersen
@ 1997-11-28 10:45       ` Jan Vroonhof
  0 siblings, 0 replies; 11+ messages in thread
From: Jan Vroonhof @ 1997-11-28 10:45 UTC (permalink / raw)


Thor Kristoffersen <thor@unik.no> writes:

> Sheer luck.  I wasn't so lucky, though; not long ago one system
> administrator kindly pointed out to me that I had about 30 old telnet
> processes lying around on a heavily loaded server.  They were all left
> there by `nntp-open-rlogin'.

Well it seems to me that there must be something wrong. I am not a
unix internals guru, but seems to me that the telnet must get
terminated at the time where NNTP server closed the connection because 
of timeout and it tries to write "remote has closes connection" to the
nonexistent socket connection.

Jan


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

end of thread, other threads:[~1997-11-28 10:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-27 10:53 WTF, sleep-for? Hrvoje Niksic
1997-11-27 13:57 ` Lars Magne Ingebrigtsen
1997-11-27 16:32   ` Jan Vroonhof
1997-11-27 19:03     ` Lars Magne Ingebrigtsen
1997-11-27 14:56 ` Thor Kristoffersen
1997-11-27 15:00   ` Hrvoje Niksic
1997-11-27 16:34     ` Lars Magne Ingebrigtsen
1997-11-27 19:53       ` Felix Lee
1997-11-27 16:04   ` Jan Vroonhof
1997-11-27 16:34     ` Thor Kristoffersen
1997-11-28 10:45       ` Jan Vroonhof

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