GNU bug report logs - #56682
Fix the long lines font locking related slowdowns

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Thu, 21 Jul 2022 18:01:01 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 56682 <at> debbugs.gnu.org
Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing.
Date: Fri, 30 Dec 2022 17:25:58 +0000
>
> I think it's quite urgent (it's all too easy to forget: better a subpar 
> entry than no entry at all).
>

I'll do that very soon.

>
> Hmm... I understand that part but that doesn't tell me how I (the coder) 
> or the function can find out which tag to use :-(
>

You have to know where your function is called and by which caller a lock 
was placed.  Currently there are three such tags (and I don't expect more 
tags in core): fontification-functions, pre-command-hook and 
post-command-hook.

>
> Looking more at the code, I have another question: why is 
> `narrowing_locks` a global alist indexed by buffers, instead of being a 
> buffer-local variable?
>

For efficiency reasons.  If it were a buffer-local variable, 
reset_outermost_narrowings, which is called by redisplay_internal, would 
have to consider all buffers, which would become unnecessarily slow with 
many (say 1000) buffers.  With a global alist, only the (few) buffers in 
which narrowing locks are actually in effect are considered.





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

Previous Next


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