mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
Wrap stdout in a 64KB BufWriter when writing `parse` output. The tree walking loop makes many small write calls (parentheses, indentation, node kinds, ranges, etc.) which are expensive without buffering. When parsing the jquery.js corpus file, cuts the total time roughly in half. These savings only show when piping the result to a file, otherwise terminal rendering time usually dominates, hiding all gains. Also do the same for the `query` command's output. |
||
|---|---|---|
| .. | ||
| cli | ||
| config | ||
| generate | ||
| highlight | ||
| language | ||
| loader | ||
| tags | ||
| xtask | ||