Skip to content

Bump to tree-sitter 0.20.7 and regenerate parser#42

Merged
the-mikedavis merged 1 commit into
elixir-lang:mainfrom
connorlay:ts-build-abi-14
Oct 16, 2022
Merged

Bump to tree-sitter 0.20.7 and regenerate parser#42
the-mikedavis merged 1 commit into
elixir-lang:mainfrom
connorlay:ts-build-abi-14

Conversation

@connorlay

@connorlay connorlay commented Oct 16, 2022

Copy link
Copy Markdown
Contributor

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.

@the-mikedavis the-mikedavis left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

@the-mikedavis Done!

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

Copy link
Copy Markdown
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