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

Scrolling performance impact when incline is enabled #69

Open
diocletiann opened this issue Apr 26, 2024 · 6 comments
Open

Scrolling performance impact when incline is enabled #69

diocletiann opened this issue Apr 26, 2024 · 6 comments

Comments

@diocletiann
Copy link

Thanks for the awesome plugin! I've noticed that while holding C-e/y or C-j/k, if incline is enabled, nvim can't keep up with a 120hz display and I get stutter both in Kitty and Neovide. When I disable incline, the problem goes away. Is it doing work while scrolling that could be paused? Thanks.

@b0o
Copy link
Owner

b0o commented Apr 26, 2024

Is it doing work while scrolling that could be paused?

Hi, yes Incline does re-render on the CursorMoved event. This is currently not configurable, but there's an open issue for making events configurable: #62.

For now, you can try increasing the debounce threshold:

require('incline').setup {
  debounce_threshold = {
    falling = 75,
    rising = 75,
  },
}

@diocletiann
Copy link
Author

This helped, thanks.

@diocletiann
Copy link
Author

diocletiann commented Apr 27, 2024

Spoke too soon, Neovide still lags when scrolling, even when the cursor line isn't changing.

@b0o
Copy link
Owner

b0o commented Apr 27, 2024

Was the original issue with Neovide as well? Do you have this issue with nvim in the terminal?

@diocletiann
Copy link
Author

Was the original issue with Neovide as well? Do you have this issue with nvim in the terminal?

with the default values both Kitty and Neovide were affected. It seemed like the increased debounce had helped Kitty, I'll double check. Neovide is still choppy.

@diocletiann
Copy link
Author

Kitty seems fine with debounce 100, at least on my M1 Max. I do disable vsync in Kitty and termsync in nvim so ymmv.

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

No branches or pull requests

2 participants