unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Tramp with global-auto-revert-mode.
Date: 15 May 2004 20:18:13 +0200	[thread overview]
Message-ID: <x565axtuze.fsf@lola.goethe.zz> (raw)
In-Reply-To: <86ekpl61qm.fsf@slowfox.dyndns.org>

Kai Grossjohann <kai.grossjohann@gmx.net> writes:

> David Kastrup <dak@gnu.org> writes:
> 
> > Kai Grossjohann <kai.grossjohann@gmx.net> writes:
> >
> >> David Kastrup <dak@gnu.org> writes:
> >> 
> >> > Uh, much too complicated.
> >> 
> >> I'm afraid I don't understand you: Do you mean that just the last
> >> step is too complicated, or that the whole procedure that I described
> >> is too complicated?
> >
> > The whole procedure.
> 
> Okay.  I agree.  Though our ideas of simplicity are different -- I
> was thinking of using multiple connection buffers.

Those have to be set up and initialized.  You know that Tramp
initialization takes a _lot_ of time.  If we have some timer-related
events, it is likely that we will get an indefinite stack of sessions
all occupied with initializing a connection.

> > Look, you are talking all the time about "Tramp" as if it was a
> > sentient being.  It isn't.
> 
> It must be!  It even changed names multiple times, this tells us it
> knows what it likes.

Pffft.  With that sort of reasoning, XEmacs aka Lucid Emacs aka
Emacs19-to-be-well-at-some-time-we-thought-so would be three times as
intelligent as Emacs.  Don't bother commenting on that: it's no fun
starting a flame war if we are all supposed to be on the same side.

> > "Tramp" consists of two entirely different pieces: the user level
> > routines (of which several can be running at once in different
> > "threads" or Emacs' equivalence to it) and the filter routine.
> > Those are basically independent from each other.
> 
> What is a filter routine?  If you are talking about process filters,
> in the sense of set-process-filter, then there are no filter
> routines in Tramp.

Oh, I see.  Well, it doesn't matter, strictly speaking.  Whoever calls
accept-process-output should feel qualified, when being woken up, to
do the work of the non-existent process-filter, and if after that its
own task has not been finished (or even started), call
accept-process-output again.

> Are you suggesting to change Tramp such that there is a filter
> routine?

Whether you call the routine by an actual process-filter, or some task
having called accept-process-filter does it, does not make _much_ of a
difference.  However, a separate process filter can be called at
slightly more times than an accept-process-filter task can be woken
up, (because the process filter starts without a personal stack frame,
and thus need not be "on top" of the stack), so the process filter
approach would probably provide a lower latency.

> > Ok, here is what the filter routine does when it is called: it
> > collects the stuff from the output until it has a completely reply to
> > the currently sent command available.  If it has, it takes the
> > request and marks it as completed (tacking the results to the
> > request).
> >
> > [Entry point for getting a command on the way:]
> > It then takes a look whether there are still outstanding commands in
> > the queue.  If there are, it takes the next one from the queue and
> > sends it through, marking it as being in progress.
> >
> > That's all.  The filter routine never changes, it does just that.
> > There is only one filter routine at work at most at any time.
> >
> > Now for the user level stuff: it knows it needs to get commands
> > through.  So it makes a request data structure and tacks it to the end
> > of the current queue (or, if the command is particularly urgent, like
> > when we are doing autorevert checking, to the _front_ of the current
> > queue) and then calls accept-process-output on the process repeatedly
> > until the command finally is marked as being processed.  Then it
> > takes the results and returns.

Of course, if the shell is idle at the time that a command has been
entered into the queue, the user level routine should manually call
the above "Entry point for getting..." before relapsing into
accept-process-output, or nothing will get done, ever.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2004-05-15 18:18 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-12 22:54 Tramp with global-auto-revert-mode Luc Teirlinck
2004-05-12 23:26 ` Luc Teirlinck
2004-05-13 23:11   ` Kim F. Storm
2004-05-13 23:24     ` Luc Teirlinck
2004-05-13 23:46       ` Kim F. Storm
2004-05-14  0:08         ` Luc Teirlinck
2004-05-14  1:17           ` Stefan Monnier
2004-05-14  1:32             ` Luc Teirlinck
2004-05-14  2:35               ` Stefan Monnier
2004-05-14  2:53                 ` Luc Teirlinck
2004-05-14  3:08                 ` Luc Teirlinck
2004-05-14  4:16                   ` Stefan Monnier
2004-05-14  4:45                     ` Luc Teirlinck
2004-05-14  5:09                       ` Stefan Monnier
2004-05-14 19:13                         ` Luc Teirlinck
2004-05-14 21:02                       ` Richard Stallman
2004-05-14  5:01                     ` Luc Teirlinck
2004-05-14 23:00                     ` Kim F. Storm
2004-05-15  0:44                       ` Luc Teirlinck
2004-05-15  1:39                       ` Luc Teirlinck
2004-05-15 18:34                         ` Richard Stallman
2004-05-15 20:44                           ` Luc Teirlinck
2004-05-15 23:44                             ` Luc Teirlinck
2004-05-16  0:41                               ` Luc Teirlinck
2004-05-16 13:52                                 ` Andreas Schwab
2004-05-17 11:04                               ` Richard Stallman
2004-05-17 14:20                                 ` Luc Teirlinck
2004-05-16  5:58                             ` Eli Zaretskii
2004-05-16 18:11                               ` Luc Teirlinck
2004-05-16 18:32                                 ` Luc Teirlinck
2004-05-16 20:04                                 ` Luc Teirlinck
2004-05-16 22:41                                   ` Kim F. Storm
2004-05-17  5:21                                     ` Kai Grossjohann
2004-05-17 12:45                                     ` Kim F. Storm
2004-05-17 15:03                                       ` Luc Teirlinck
2004-05-17 15:22                                         ` Kim F. Storm
2004-05-18 16:25                                       ` Stefan Monnier
2004-05-18 17:10                                         ` Luc Teirlinck
2004-05-21 23:44                                           ` Kim F. Storm
2004-05-22  1:08                                             ` Luc Teirlinck
2004-05-22 11:52                                               ` Kim F. Storm
2004-05-23 17:21                                                 ` Michael Albinus
2004-05-17  6:04                                 ` Eli Zaretskii
2004-05-15  2:50                       ` Luc Teirlinck
2004-05-15 13:19                         ` Andreas Schwab
2004-05-15 13:34                           ` Luc Teirlinck
2004-05-15 16:45                             ` Andreas Schwab
2004-05-15 17:49                               ` Luc Teirlinck
2004-05-15 13:51                           ` Luc Teirlinck
2004-05-15 18:26                             ` Eli Zaretskii
2004-05-15  3:23                       ` Luc Teirlinck
2004-05-15 18:02                       ` Luc Teirlinck
2004-05-14 21:02               ` Richard Stallman
2004-05-14  2:31             ` Luc Teirlinck
2004-05-14  5:32               ` Luc Teirlinck
2004-05-14 11:36             ` Kai Grossjohann
2004-05-14 12:06               ` David Kastrup
2004-05-14 17:06                 ` Stefan Monnier
2004-05-14 17:54                   ` David Kastrup
2004-05-14 18:30                     ` Stefan Monnier
2004-05-14 19:08                     ` Kim F. Storm
2004-05-14 19:26                       ` David Kastrup
2004-05-14 20:33                         ` Kim F. Storm
2004-05-14 21:00                           ` David Kastrup
2004-05-14 21:19                             ` Kim F. Storm
2004-05-14 21:33                               ` Stefan Monnier
2004-05-14 22:55                                 ` Kim F. Storm
2004-05-14 23:04                                   ` Stefan Monnier
2004-05-15 18:33                                 ` Richard Stallman
2004-05-14 22:11                               ` David Kastrup
2004-05-14 22:57                                 ` Kim F. Storm
2004-05-14 22:47                           ` Luc Teirlinck
2004-05-14 23:14                             ` Kim F. Storm
2004-05-14 23:38                               ` Luc Teirlinck
2004-05-14 22:50                           ` Luc Teirlinck
2004-05-14 23:00                           ` Luc Teirlinck
2004-05-14 20:40                       ` Kai Grossjohann
2004-05-14 23:26                         ` David Kastrup
2004-05-15 16:19                           ` Kai Grossjohann
2004-05-15 17:01                             ` David Kastrup
2004-05-15 17:26                               ` Kai Grossjohann
2004-05-15 18:18                                 ` David Kastrup [this message]
2004-05-16 14:11                                   ` Kai Grossjohann
2004-05-15 18:33                     ` Richard Stallman
2004-05-16 14:13                       ` Kai Grossjohann
2004-05-17  1:14                         ` Luc Teirlinck
2004-05-17 22:58                         ` Richard Stallman
2004-05-18  3:44                           ` Luc Teirlinck
2004-05-14 20:32                   ` Kai Grossjohann
2004-05-14 21:35                     ` Michael Albinus
2004-05-15 16:22                       ` Kai Grossjohann
2004-05-14 20:29                 ` Kai Grossjohann
2004-05-14 21:02       ` Richard Stallman
2004-05-14  0:54     ` Luc Teirlinck
2004-05-14  2:13     ` Luc Teirlinck

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=x565axtuze.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).