bug#81334: 32.0.50; fontifying buffers with many blocks is very slow

Yuan Fu <[email protected]> Tue, 4 Aug 2026 21:09:58 -0700
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>

> On Aug 1, 2026, at 2:49=E2=80=AFAM, Eli Zaretskii <[email protected]> =
wrote:
>=20
>> From: Yuan Fu <[email protected]>
>> Date: Wed, 29 Jul 2026 00:07:06 -0700
>> Cc: Eli Zaretskii <[email protected]>,
>> [email protected],
>> [email protected],
>> [email protected],
>> [email protected],
>> [email protected]
>>=20
>>=20
>>=20
>>> On Jul 28, 2026, at 4:38=E2=80=AFAM, Rahul Martim Juliato =
<[email protected]> wrote:
>>>=20
>>> Yuan Fu <[email protected]> writes:
>>>=20
>>>>> On Jul 25, 2026, at 10:40=E2=80=AFPM, Eli Zaretskii <[email protected]> =
wrote:
>>>>>=20
>>>>>> [...]
>>>>>=20
>>>>> Which patch you think we should install?  Rahul posted 2 patches.
>>>>=20
>>>> This one (see attached). I took liberty to edit some of the =
comments.
>>>>=20
>>>=20
>>> Both patches are needed: Yuan's new 'language-cache.patch' and the
>>> markdown-ts-mode change, which I'm re-attaching here as
>>> 'markdown-ts-mode-Make-inline-HTML-embed-local-bug-81334.patch'.
>>>=20
>>> The latter is a one-liner on markdown-ts-mode.el, adding :local t to =
the
>>> html_tag range rule.
>>>=20
>>> The two are complementary: the cache removes the parser-creation =
cost,
>>> and the :local t removes the O(N^2) non-local range update that =
remains
>>> once parser creation is cheap.
>>>=20
>>> --=20
>>> Rahul Martim Juliato
>>>=20
>>> <markdown-ts-mode-Make-inline-HTML-embed-local-bug-81334.patch>
>>=20
>> That=E2=80=99s true, sorry, I thought we=E2=80=99ve switched to local =
parsers for markdown-ts-mode already. Both should be applied on master.
>=20
> Thanks, I've now installed both of the patches on the master branch,
> and I'm closing this bug.

Thanks!=