GNU bug report logs - #58950
[PATCH] * lisp/subr.el (buffer-match-p): Optimise performance

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Tue, 1 Nov 2022 19:12:02 UTC

Severity: wishlist

Tags: patch

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 58950 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#58950: [PATCH] * lisp/subr.el (buffer-match-p): Optimise performance
Date: Sun, 8 Jan 2023 23:48:23 +0200
On 07/01/2023 14:57, Mattias EngdegÄrd wrote:
> 6 jan. 2023 kl. 22.41 skrev Dmitry Gutov <dgutov <at> yandex.ru>:
> 
>>> (I wish we had (byte-)compiled elisp functions carrying their own source, either as s-exp, string of formatted source text, or source file reference -- that would allow for sensible editing in Customise without performance penalty. But Santa gave me a wool jumper instead, that's nice too.)
>>
>> We kind of have that already, if we just made the type for be 'sexp', or a Lisp form. With all the freedom associated with it, just lower performance compared to a compiled function.
> 
> That's short in two respects: performance, and non-retention of formatting and comments. We could store source refs in:
> 
> - a hash table weakly keyed on the code object
> - some back corner of byte-code objects
> - OClosures

That's still seems like an overkill for font-lock-global-modes. And it's 
hard to draw a line between defcustoms which should have their own 
mini-languages, and those that do not.

Or to look at it the other way -- perhaps the line has been drawn now, 
since we haven't received any further requests for extending the syntax.

> We have a similar problem with regexps, which are only retained and edited in the traditional syntax.
> 
> We are veering off-topic. Sorry about that.
> 
>> I'm on the fence regarding changing it, though, for compatibility and ergonomical reasons (it's easier for the user to avoid typing a dot).
> 
> Is compatibility a serious concern given that buffer-match-p is new in 29?

This close to a release, it most likely is.

Another compatibility goal (though probably not a hard requirement) is 
being able to replace project--buffer-check with the standard code, 
while keeping all existing user customizations in 
project-kill-buffer-conditions and project-ignore-buffer-conditions.

The alternative would be to have a prolonged migration procedure.




This bug report was last modified 2 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.