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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: 56682 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, dgutov <at> yandex.ru
Subject: bug#56682: locked narrowing
Date: Thu, 01 Dec 2022 18:48:26 -0500
Maybe another option is to do the scan more lazily, keeping track more
precisely of what was scanned and/or needs rescanning.

Do an initial scan on the whole buffer and after that keep a BEG..END
limit approximating the region that has been modified since the last scan.

As long as

   END - BEG < LINE_LENGTH_THRESHOLD - MAX_SEEN_LINE_LENGTH

then we know we don't need to rescan anything at all.  And when we do
need to rescan we can limit the scan to

   BEG - MAX_SEEN_LINE_LENGTH ... END + MAX_SEEN_LINE_LENGTH

I assume here that we would remember the MAX_SEEN_LINE_LENGTH.


        Stefan





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

Previous Next


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