GNU bug report logs - #42267
Fontification takes a long time when an equation contains a double prime

Previous Next

Package: auctex;

Reported by: Najib Idrissi-Kaïtouni <najib.idrissi.kaitouni <at> gmail.com>

Date: Wed, 8 Jul 2020 14:47:02 UTC

Severity: normal

Tags: fixed

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


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

From: Najib Idrissi <najib.idrissi.kaitouni <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 42267 <at> debbugs.gnu.org
Subject: Re: bug#42267: Fontification takes a long time when an equation
 contains a double prime
Date: Thu, 9 Jul 2020 10:14:47 +0200
[Message part 1 (text/plain, inline)]
Hi,

> Can you please share this test file so others can load it and see if the
> behavior is reproducible?
>
Sure, see the attached file. As I said, it's a file filled with lipsum 
with a single equation at the bottom.

> AUCTeX's fontification for math went through a bigger overhaul.  Please
> share the file and a recipe (preferably starting with `emacs -Q') how to
> trigger your obeservation, that would help a lot.

1. Open the file and go to the equation at the bottom
2. Notice that editing speed inside the equation is normal (e.g. hold
   the space bar inside the equation and notice that it goes at a
   normal speed)
3. Add a double prime somewhere in the equation, e.g. after the 2 so
   that it becomes 1+1=2''
4. Notice that now editing speed is degraded, for example hold the
   space bar at the end of the equation and notice that there is now a
   stutter. If your CPU is too fast and you don't notice the stutter,
   you can just copy more paragraphs of lipsum, I guess.

In my real life example (that I cannot share because the article in 
question is not public yet) the slowdown is so bad that a single 
keystroke inside an affected equation can take several seconds.

Best regards,
Najib Idrissi

Le 08/07/2020 à 22:22, Arash Esbati a écrit :
> Hi Najib,
>
> Najib Idrissi-Kaïtouni <najib.idrissi.kaitouni <at> gmail.com> writes:
>
>> I would guess that Auctex thinks '' is the end of a quote and is
>> looking for the (nonexistent) double backtick `` that would be the
>> beginning of it. I tried to get a backtrace with gdb and it's not
>> exactly clear which precise function is to blame, but it was always as
>> part of the fontification. As a test, I filled a buffer with some
>> lipsum and put an equation at the bottom. Without '' everything is
>> fine, as soon as there is a '' in the equation things start to
>> noticeably slow down.
> Can you please share this test file so others can load it and see if the
> behavior is reproducible?
>
>> I am currently using the latest version, 12.2.4, and Emacs
>> 27.0.91. The behavior is fairly recent, although I couldn't say if it
>> started with this release precisely, it may have started more than a
>> week ago.
> AUCTeX's fontification for math went through a bigger overhaul.  Please
> share the file and a recipe (preferably starting with `emacs -Q') how to
> trigger your obeservation, that would help a lot.
>
> Thanks in advance, Arash
[Message part 2 (text/html, inline)]
[foo.tex (text/x-tex, attachment)]

This bug report was last modified 5 years and 7 days ago.

Previous Next


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