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

From: Gregory Heytings <gregory <at> heytings.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 56682 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#56682: Fix the long lines font locking related slowdowns
Date: Sat, 13 Aug 2022 19:54:18 +0000
>> We had that discussion a month ago, and concluded that local fixes in 
>> every major (and minor) modes were not the way to go.  Having that 
>> discussion again does not seem fruitful.
>
> Did you have that discussion with other people who have not authored a 
> single major mode? That's ridiculous.
>

You mean, Eli, Lars and me?  I agree with you, we're indeed ridiculous.

>
> It showed specific pitfalls we can take care of in other major modes as 
> well.
>

It doesn't.  Please do (on you Core i9 computer):

for i in $(seq 1 60); do cat dictionary.json; done > hugedictionary.json

Now open that file with the code on master, and with your branch, and type 
M->.  With the code on master the effect is instantaneous (about 50 ms on 
my computer), with your branch it takes ~20 seconds (21 seconds on my 
computer).  If you cannot see the difference, I don't know what else I 
could say.  And please don't tell me "but this is not the kind of file 
size we should care about".  That would be wrong, both because we do care 
about that file size, and because if that basic operation takes 20 seconds 
in a 1 GB file on your Core i9 computer, that same basic operation will 
take 20 seconds on a 20 MB or 50 MB file for someone else who has a slower 
CPU.

Again, the right thing to do here is to improve the efficiency of 
syntax-ppss in one way or another.  Of course, doing that is several 
orders of magnitude more difficult than just undoing what others have 
already done and claiming that the result is better.




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.