Open matu3ba opened 3 years ago
I'm not familiar with tree-sitter, so I'm very unsure of these log placements (especially the query one):
https://github.com/dariooddenino/helix/commit/2fd1ab1c18a4cd646ef969aae5ac7752dc1e53cb
I think the query one may be logging the query analysis time rather than the time it takes to run the query (though I'd have to dig further to confirm). You should consult the tree-sitter-cli code in the tree-sitter repo https://github.com/tree-sitter/tree-sitter/tree/1f1b1eb4501ed0a2d195d37f7de15f72aa10acd0 to see how it gathers the metrics.
I think the query one may be logging the query analysis time rather than the time it takes to run the query (though I'd have to dig further to confirm). You should consult the tree-sitter-cli code in the tree-sitter repo https://github.com/tree-sitter/tree-sitter/tree/1f1b1eb4501ed0a2d195d37f7de15f72aa10acd0 to see how it gathers the metrics.
Yeah, I had a little more time to check how tree-sitter work and helix code, and that spot has nothing to do with the query execution time.
Still need to pinpoint exactly the point, but I think Syntax::update
is probably a good start.
Describe your feature request
Provide very simple logging for tree-sitter on
INFO
/-vvv
, so users can estimate expections of tree-sitter performance: 1.parsing
andquery
time can be printed separately. As of now, tree-sitter timings are not logged at all:hx -vvv ir.cpp
of ir.cpp shows only content fromhelix_lsp::transport
andmio::poll
.Details truncated to 125 symbols line length, because some stuff is giantic in output even on only opening files. The same output uncovered bug #941.