Skip to content

perf(treesitter): add a few optimizations#438

Merged
andymass merged 1 commit into
andymass:masterfrom
TheLeoP:perf
May 19, 2026
Merged

perf(treesitter): add a few optimizations#438
andymass merged 1 commit into
andymass:masterfrom
TheLeoP:perf

Conversation

@TheLeoP

@TheLeoP TheLeoP commented May 11, 2026

Copy link
Copy Markdown
Contributor
  • Remove treesitter specific memoization
  • Do not query/traverse matches for the whole buffer, only for the region defined by g:matchup_treesitter_stopline
  • Remove generic path-like parsing of treesitter information, parse only the necessary data
  • Remove some unnecessary function calls

This improves drastically the performance for big files, while keeping it reasonable as long as g:matchup_treesitter_stopline is a reasonable value

- Remove treesitter specific memoization
- Do not query/traverse matches for the whole buffer, only for the
  region defined by `g:matchup_treesitter_stopline`
- Remove generic path-like parsing of treesitter information, parse only
  the necessary data
- Remove some unnecessary function calls
@andymass
andymass merged commit 00dcd75 into andymass:master May 19, 2026
7 checks passed
@andymass

Copy link
Copy Markdown
Owner

thank you!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants