-
Notifications
You must be signed in to change notification settings - Fork 97
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
bug: performance issues on large files with folds #285
Comments
mtrajano
added a commit
to mtrajano/todo-comments.nvim
that referenced
this issue
Jul 26, 2024
Fixes: folke#285 Currently on a window update such as `WinScroll` highlight_win is looping through every line from from `w0` to `w$` to update the highlights. On large files with very large folded regions these two lines can be very far apart and highlighting every single line can be costly even though they are not in view. This update adds a check to skip over any liens hidden in a fold.
mtrajano
added a commit
to mtrajano/todo-comments.nvim
that referenced
this issue
Jul 26, 2024
Fixes: folke#285 Currently on a window update such as `WinScroll` highlight_win is looping through every line from from `w0` to `w$` to update the highlights. On large files with very large folded regions these two lines can be very far apart and highlighting every single line can be costly even though they are not in view. This update adds a check to skip over any lines hidden in a fold.
mtrajano
changed the title
bug: Performance issues on large files with folds
bug: performance issues on large files with folds
Jul 26, 2024
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0
Operating system/version
MacOS 13.6.3
Describe the bug
When scrolling on a large file with folds there is a very noticeable lag during scrolling. There's a
WinScroll
autocommand that fires in order to update the window highlights. This works fine if there are no folds since it only processes a few dozen lines but in a large file with foldsw0
andw$
can be very far apart and currently it's looping through every single line to add the highlight even though they are not in view. I tried setting thehighlight.throttle
option to a lower value and it did not help much. (This config value is also not documented). I'm attaching a video of the issue happening.Screen.Recording.2024-07-02.at.2.46.00.PM.mov
Steps To Reproduce
Expected Behavior
Ideally todo-comments wouldn't process all these folded lines that are not in view.
Repro
The text was updated successfully, but these errors were encountered: