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 #1714 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>,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#56682: Fix the long lines font locking related slowdowns
Date: Tue, 16 Aug 2022 14:03:16 +0000
>> Without assuming that computers have infinitely fast CPUs, that is?
>
> If the font-lock rules to use in the buffer depend on whether the first 
> line of the buffer starts with #! or not, then your narrowing will break 
> them even tho they could work perfectly fine in a 1TB buffer without 
> requiring an infinitely fast CPU (since they don't need to scan the 
> whole buffer: just the region of interest plus the first 2 chars).
>

Why on earth should a font-lock rule check, inside each redisplay cycle, 
whether the first line of the buffer starts with #! or not?  Isn't that an 
information that can, and in fact should, be cached?




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.