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

Performance #59

Open
theHamsta opened this issue Apr 23, 2021 · 3 comments
Open

Performance #59

theHamsta opened this issue Apr 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@theHamsta
Copy link
Member

Describe the bug

Current search for textobjects is too slow and could be more flexible (counts, textobjects in same line).

Solution

Avoid iter_prepared_matches in find_best_match. Use find_best_matches to allow the use of v:count

@theHamsta theHamsta added the bug Something isn't working label Apr 23, 2021
@theHamsta
Copy link
Member Author

We could also do partial invalidations of the cache

@ilan-schemoul
Copy link
Contributor

Is there any update on this front ?
In c files used at work (usually between 5K-15k lines) using textobjects freeze the computer for 15 seconds.
If there's some low hanging fruit I can maybe take a shot but in the same time I know you're waiting for TS 1.0 before accepting some PR

@ilan-schemoul
Copy link
Contributor

I was curious what was happening also with swapping being slow. I tried swapping nodes on a 5K line c file and what take all the time is swap_nodes() which itself calls vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr, "utf-8") which is very slow.
I didn't know that what was called was the lsp server. I thought it was pure treesitter. But anyway not this package fault for swap...
But still very annoying to have my computer freeze for 10 seconds whenever I forget not to use this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants