emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Yuan Fu
Subject: Re: Tree-sitter api
Date: Sat, 25 Dec 2021 00:31:26 -0800


> On Dec 24, 2021, at 2:21 AM, Yoav Marco <yoavm448@gmail.com> wrote:
> 
> 
> 
>> Yuan Fu <notifications@github.com> writes:
>>> I can see some advantages to compile the query ahead of time. 1) It would be
>>> helpful to know there is an error before calling
>>> tree-sitter-font-lock-fontify-region and see an unfontified buffer, not
>>> knowing what went wrong. I can add a function, say, 
>>> tree-sitter-compile-query
>>> that checks a query (as in query pattern) and passes it on if its correct. 
>>> 2)
>>> It could potentially saves recompilation of the query. But computing the 
>>> query
>>> most probably takes negligible time.
> 
> I'll try to benchmark it. Would be great if it really is nothing.

Sounds good, thanks. Eli, is there any profiling primitives in Emacs? How do 
you usually profile Emacs? 

Yuan


reply via email to

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