Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to tree-sitter 0.20.7 and regenerate parser #42

Merged
merged 1 commit into from
Oct 16, 2022

Conversation

connorlay
Copy link
Contributor

@connorlay connorlay commented Oct 16, 2022

Upgrading to tree-sitter 0.20.7 causes the parser to be generated for the newest ABI version 14. This includes noticeable performance improvements when parsing query files for languages like Elixir using the new primary_state_ids field.

See tree-sitter/tree-sitter#1589 and tree-sitter/tree-sitter#1852 for more information on this change.

You can see the impact of this change by comparing how long it takes to execute npm test on this branch compared to master 🙂 This change should improve the initial load time of Elixir buffers in editors like Neovim and Helix that use tree-sitter-elixir for syntax highlighting.

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, I see this cutting the time it takes to tree-sitter test roughly in half! 🚀

Two minor nits:

  • there's a typo in the commit message: "noticable" => "noticeable"
  • no need to commit the change to src/parser.c: the CI will create a commit for re-generating the parser on merge

@connorlay
Copy link
Contributor Author

@the-mikedavis Done!

@the-mikedavis the-mikedavis merged commit 0ba537d into elixir-lang:main Oct 16, 2022
@the-mikedavis
Copy link
Member

Thanks @connorlay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants