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 #2019 received at 56682 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#56682: locked narrowing
Date: Thu, 01 Dec 2022 21:52:03 -0500
>> Maybe another option is to do the scan more lazily, keeping track more
>> precisely of what was scanned and/or needs rescanning.
> Thanks.  It's an option indeed, the problem here is how to keep track of
> what was scanned or needs rescanning.

My suggestion was to have as "steady state" that "everything is scanned
except for a region between BEG...END and no line was found to be larger
than MAX_SEEN_LINE_LENGTH".  So it requires keeping track of a BEG..END
(BEG can be an integer but END would likely be an (insert-before)
marker) plus an integer keeping track of MAX_SEEN_LINE_LENGTH.
Initially BEG is 1 and END is Z.

I can't think of a good way to detect when MAX_SEEN_LINE_LENGTH can be
made smaller, tho, so we might still need to rescan the whole buffer
every once in a blue moon.


        Stefan





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.