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: Thu, 26 Jan 2023 19:12:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 26/01/2023 09:17, Yuan Fu wrote:
If anything, the :pred predicates should be more expensive, since they execute 
lisp functions and conses tree-sitter nodes into lisp objects.

Doesn't the :match predicate "cons tree-sitter nodes into lisp objects"?

IIUC the list of captures is produced inside treesit-query-capture exactly the same way before the predicates are processed -- whether they are :pred, or :match, or a combination.

But indeed, I (and most other users) would expect :match to be faster than :pred if the predicate does a regexp check anyway. That's the essence of this bug report.





reply via email to

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