Gnus development mailing list
 help / color / mirror / Atom feed
From: Martin Rohde <martin.rohde@gmx.de>
Subject: Re: 'g' in the group buffer still very slow
Date: Fri, 13 Dec 2002 18:18:15 +0100	[thread overview]
Message-ID: <87d6o5et2g.fsf@gmx.de> (raw)
In-Reply-To: <84bs3pubse.fsf@lucy.cs.uni-dortmund.de> (kai.grossjohann@uni-duisburg.de's message of "Fri, 13 Dec 2002 17:24:49 +0100")

On Day 55 of The Aftermath 3168, Kai Großjohann wrote:

> Martin Rohde <martin.rohde@gmx.de> writes:
>
>> On Day 54 of The Aftermath 3168, Kai Großjohann wrote:
>>
>>> You can put the definition in the server parameters, like this:
>>>
>>> (add-to-list 'gnus-secondary-select-methods
>>>              '(nntp "servername"
>>>                (nntp-address "host.name.of.server")
>>>                (nntp-open-connection-function nntp-open-telnet-stream)
>>>                ...other.nntp-open-telnet.settings...))
>>
>> Oops. Sorry, then Kevin was right, nntp-delete-echo has to be
>> buffer-local.
>
> Yes.
>
>> I fixed the cleaning of the server-buffer after sending "MyNOOP"
>> like you suggested and it works, but I like the version of Kevin
>> very much. In my opinion it works just as well as testing for an
>> echo in nntp-open-connection, but saves code and time.
>
> Hm?  If the code is simpler, I'm all for it, but I don't see what time
> it saves.  Is it quicker to implement or easier to maintain, or does
> it run quicker?

Sorry, I mixed some things up.
All it saves is the sending of "MyNOOP". It is wrong to speak of
"saving time". 

It just saves the additional code in nntp-open-connection, that's
why I prefer it. But the other version works as well, so if you're
prefering your way, I can send you the working patch, too.

>> Hm, but it is right to refer to nntp-open-connection-function
>> globally, isn't it? It is connection-dependend, too, but I just
>> found it as a global variable...(That's why I thought, that it
>> would be independent...)
>
> Code referring to a buffer-local variable looks the same as code
> referring to a global variable.  See this:
>
> (defvar x nil)          ; declare
> (setq x 1)              ; global value
> ; switch to some buffer foo
> (make-local-variable 'x); now it will be local to the foo buffer
> x => 1                  ; local value same as global initially
> (setq x 2)              ; set the local value
> x => 2                  ; local value
> ; switch back to previous buffer
> x => 1                  ; access global value again
>
> As you can see, the setq looks the same and the access also looks the
> same.  The only difference is the make-local-variable.

Yes, but i couldn't see a 

(make-local-variable nntp-open-connection-function) 

anywhere. Furthermore, I am not in a special buffer, when I check it
(or am I?), so that's why I asked.

>> If so, here is yet another try:
>
> Looks good to me, even though I'm not so sure about the logic.
>
> First of all, you still test the connection function, is that still
> necessary?  If the look-for-echo test works well, it should be okay to
> apply it always, making the code (a tiny bit) simpler.

I thought, it would make the start of gnus a bit faster when you are
using nntp-open-network-stream, because otherwise you would still
have the delay from nntp-accept-response when nntp-send-command is
called for the first time.

> Secondly, and this is the logic part, the check-for-echo variable
> starts out as nil.  I didn't look very closely, but I thought that the
> echo check is skipped when the variable is nil...

Its global value is nil, but in nntp-make-process-buffer it is
initialized as

(set (make-local-variable 'nntp-process-delete-echo) t)

The (defvar nntp-process-delete-echo nil) ist just a dummy
declaration (because of "free variable"-warnings). For it has to be
checked locally in the server-buffers, it doesn't matter, what its
global value is, as you explained before. 

Martin




  reply	other threads:[~2002-12-13 17:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-21 20:16 Sebastian D.B. Krause
2002-07-26 12:45 ` Simon Josefsson
2002-07-26 12:52   ` Kai Großjohann
2002-12-08 18:00   ` Sebastian D.B. Krause
2002-12-08 19:45     ` Kai Großjohann
2002-12-08 20:28       ` Sebastian D.B. Krause
2002-12-08 23:33       ` Martin Rohde
2002-12-09  7:49         ` Kai Großjohann
2002-12-09 14:02           ` Martin Rohde
2002-12-09 17:22             ` Kai Großjohann
2002-12-09 22:38               ` Martin Rohde
2002-12-10 18:30                 ` Martin Rohde
2002-12-11  4:13                   ` kgreiner
2002-12-11 20:05                     ` Martin Rohde
2002-12-11 21:09                       ` kgreiner
2002-12-12 11:37                       ` Kai Großjohann
2002-12-13 15:41                         ` Martin Rohde
2002-12-13 16:24                           ` Kai Großjohann
2002-12-13 17:18                             ` Martin Rohde [this message]
2002-12-14 12:52                               ` Kai Großjohann
2002-12-14 14:11                                 ` Martin Rohde
2002-12-11  8:21                   ` Kai Großjohann
2002-12-09  8:36         ` Kai Großjohann

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=87d6o5et2g.fsf@gmx.de \
    --to=martin.rohde@gmx.de \
    /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).