bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60953: The :match predicate with large regexp in tree-sitter font-lo


From: Dmitry Gutov
Subject: bug#60953: The :match predicate with large regexp in tree-sitter font-lock seems inefficient
Date: Wed, 1 Feb 2023 04:39:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 31/01/2023 20:16, Dmitry Gutov wrote:
Anyway, it seems like it might be too late as an addition to Emacs 29. And we can implement the match predicate using narrowing for this release, to be updated later.

So here. I've installed the first patch, which didn't raise up too many concerns previously, and here's the new iteration on the second patch. Please see the attachment.

To note the numbers: the first patch does quite well to improve the performance of modes which use :match in queries which match a lot of nodes (e.g. rust-ts-mode or ruby-ts-mode). There boost in those was on the order of 25%.

The second one is longer, and the boost (on top of the first one) is around 5-6%, stable. Not as impressive, but at least it brings :match's performance a little above :pred's in my example.

Attachment: treesit_predicate_match.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]