all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Michael Albinus <michael.albinus@gmx.de>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: master 695f679: Remove ; ; ; ###tramp-autoload cookie from Tramp defcustoms (Bug#47063)
Date: Fri, 26 Mar 2021 15:57:01 +0000	[thread overview]
Message-ID: <877dltaoxe.fsf@tcd.ie> (raw)
In-Reply-To: <87k0pu887d.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 26 Mar 2021 12:28:54 +0100")

[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> What's the performance impact here?  This is going to be called a whole
>>> bunch of times when the user hits TAB...
>>
>> It should be OK to do the condition-case wrapping around the loop rather
>> than within it, so the performance impact should be negligible.
>
> Yup; if it's hoisted out of the loop, there'd be no performance impact,

I see no discernible performance impact even if the
condition-case-unless-debug is added into the completing-read predicate,
to catch errors from user-provided read-extended-command-predicate
values.

Running the new attached benchmark with:

  emacs -Q -batch -f batch-byte-compile bench2.el
  emacs -Q -l bench2.elc

gives the following timing excerpts:

  TAB RET

  read-extended-command
    bench--expensive                     1.801461 36 0.568592
    nil                                  0.985272 35 0.552688
    command-completion-default-include-p 0.837255 29 0.453390
    bench--safe                          0.834056 29 0.452686
  bench-read-extended-command
    bench--expensive                     1.803410 36 0.566920
    nil                                  0.977062 35 0.549054
    command-completion-default-include-p 0.831130 29 0.452036
    bench--safe                          0.831380 29 0.451495

  e w w - TAB C-a C-k RET

  read-extended-command
    bench--expensive                     1.082884 30 0.415545
    nil                                  0.992358 30 0.417027
    command-completion-default-include-p 0.895481 25 0.343474
    bench--safe                          0.886560 25 0.344851
  bench-read-extended-command
    bench--expensive                     1.081067 30 0.414472
    nil                                  0.990662 30 0.415502
    command-completion-default-include-p 0.886688 25 0.343094
    bench--safe                          0.898391 25 0.344109

So back to the original question: do we want this safety net in
command-completion-default-include-p, around
read-extended-command-predicate (which is user-customisable), or not at
all?

And if we do add it, should it include a helpful message as per
Michael's suggestion?

I'm happy either way.

-- 
Basil


[-- Attachment #2: bench2.el --]
[-- Type: application/emacs-lisp, Size: 4919 bytes --]

  parent reply	other threads:[~2021-03-26 15:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210313133546.6042.78482@vcs0.savannah.gnu.org>
     [not found] ` <20210313133547.AA06C20B2E@vcs0.savannah.gnu.org>
2021-03-13 22:27   ` master 695f679: Remove ; ; ; ###tramp-autoload cookie from Tramp defcustoms (Bug#47063) Basil L. Contovounesios
2021-03-13 23:20     ` Stefan Monnier
2021-03-14  8:39       ` Michael Albinus
2021-03-14 12:59         ` Basil L. Contovounesios
2021-03-14 14:57           ` Stefan Monnier
2021-03-24 22:19             ` Basil L. Contovounesios
2021-03-25  8:25               ` Michael Albinus
2021-03-26 15:18                 ` Basil L. Contovounesios
2021-03-26 15:24                   ` Michael Albinus
2021-03-25  9:12               ` Lars Ingebrigtsen
2021-03-25 14:05                 ` Stefan Monnier
2021-03-26 11:28                   ` Lars Ingebrigtsen
2021-03-26 13:39                     ` Stefan Monnier
2021-03-26 14:42                       ` Michael Albinus
2021-03-26 18:39                         ` Basil L. Contovounesios
2021-03-26 15:36                       ` Basil L. Contovounesios
2021-03-26 16:37                         ` Stefan Monnier
2021-03-26 18:18                           ` Basil L. Contovounesios
2021-03-26 22:12                       ` Lars Ingebrigtsen
2021-03-26 15:57                     ` Basil L. Contovounesios [this message]
2021-03-26 15:33                   ` Basil L. Contovounesios
2021-03-26 16:32                     ` Stefan Monnier
2021-03-26 18:18                       ` Basil L. Contovounesios
2021-03-26 15:27                 ` Basil L. Contovounesios
2021-03-26 22:11                   ` Lars Ingebrigtsen
2021-03-27  1:18                     ` Basil L. Contovounesios
2021-03-27 12:33                       ` Lars Ingebrigtsen
2021-03-27 20:29                         ` Basil L. Contovounesios
2021-03-14 14:57         ` Stefan Monnier
2021-03-14 18:42           ` Michael Albinus
2021-03-14 20:30             ` Stefan Monnier
2021-03-15  9:00               ` Michael Albinus

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=877dltaoxe.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.