GNU bug report logs -
#64391
30.0.50; buffer narrowing slowdown regression in emacs 29
Previous Next
Full log
Message #53 received at 64391 <at> debbugs.gnu.org (full text, mbox):
6 juli 2023 kl. 20.45 skrev Gregory Heytings <gregory <at> heytings.org>:
>> How are those different from what Mattias proposed? Is this a completely different set of changes, or is it what Mattias suggested, just in several separate parts?
>>
>
> It resembles what Mattias proposed of course (remove the negative effect of setting a buffer-local variable in all calls to narrow-to-region, and limit it to case when labeled narrowing is used), but it's nonetheless different. The essential change is isolated in the first commit, and in the second commit, instead of moving the body of Fnarrow_to_region to another function with an additional (third) argument, I use another separate function which calls Fnarrow_to_region. I believe the result is clearer.
Gregory's first two patches and mine are indeed equivalent up to refactoring; either would do. The moving parts are the same, so performance shouldn't differ noticeably. Neither appears to tie our hands for future changes as the interfaces are all internal.
The third of Gregory's patches appears mainly cosmetic. Maybe that one is less important for emacs-29.
I have one question about the new `with-restriction` macro: if it is intended as a convenience macro for unlabelled narrowing as well, shouldn't it then expand to the obvious
(save-restriction
(narrow-to-region BEG END)
BODY)
instead the much more expensive call to a helper function?
The documentation should also make it clear that `nil` is not a valid label.
This bug report was last modified 1 year and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.