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


Message #179 received at 56682 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 56682 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#56682: Fix the long lines font locking related slowdowns
Date: Mon, 25 Jul 2022 21:23:55 +0000
>
> Before using a blunt tool like the forced-narrowing now in 
> `feature/long-lines-and-font-locking`, I think we should try and figure 
> out *why* the recipe below is so slow.
>

It's not a blunt tool, it's an appropriate tool to help making sure that 
Emacs remains responsive when large files are visited.  Think of it as 
POSIX's ulimits.  Allowing fontification-functions to search for 
arbitrarily complex regexpes in an arbitrarily large buffer, each and 
every time they are asked to to highlight a small chunk of the said 
buffer, is a recipe for disaster.  If for some reason modes really need to 
go through to the whole buffer to decide which highlighting to use, they 
should to do so outside of fontification-functions, and ideally once, for 
example, when the file is loaded.

(Note that at the moment that tool is enabled only when files with long 
lines are visited.)




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.