unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 48738@debbugs.gnu.org
Subject: bug#48738: [PATCH] Optimized `describe-variable' predicate
Date: Mon, 31 May 2021 07:00:06 +0200	[thread overview]
Message-ID: <ebeded09-7a9f-d897-c325-80683ec0ae55@daniel-mendler.de> (raw)
In-Reply-To: <87h7ijmrie.fsf@gnus.org>

On 5/31/21 6:55 AM, Lars Ingebrigtsen wrote:
> Thanks; applied to Emacs 28 with some changes -- I thought the
> `ignore-errors' logic was kinda unclear, so I rewrote that bit using an
> explicit `condition-case' checking for the error thrown in this case.

Makes sense. Thanks for applying the patch.

> Adjusted patch included below; hopefully I didn't introduce any errors
> here...
> 
>> Ideally there would be a `buffer-local-boundp` predicate we could use
>> here.
> 
> Yes, that would be nice, I think.
> 
> And we probably have a lot of code in Emacs that uses
> `with-current-buffer' instead of `buffer-local-value' that could be
> similarly optimised (but I guess it mostly only makes sense to do so
> when it's called in an intensive loop like here).

Yes, when I find such case I will report them or provide a patch.
However it really matters in very few cases. Here the predicate is
called 10k+ times when generating all completions.





  reply	other threads:[~2021-05-31  5:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30  4:27 bug#48738: [PATCH] Optimized `describe-variable' predicate Daniel Mendler
2021-05-31  4:55 ` Lars Ingebrigtsen
2021-05-31  5:00   ` Daniel Mendler [this message]
2021-05-31  5:06     ` Lars Ingebrigtsen
2021-05-31  5:13       ` Lars Ingebrigtsen
2021-05-31  5:19         ` Daniel Mendler
2021-05-31  5:23           ` Lars Ingebrigtsen
2021-05-31  5:30             ` Daniel Mendler
2021-05-31  5:32               ` Lars Ingebrigtsen

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=ebeded09-7a9f-d897-c325-80683ec0ae55@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=48738@debbugs.gnu.org \
    --cc=larsi@gnus.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).