b0o / incline.nvim

🎈 Floating statuslines for Neovim, winbar alternative
MIT License
759 stars 14 forks source link

Scrolling performance impact when incline is enabled #69

Open diocletiann opened 4 months ago

diocletiann commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

This helped, thanks.

diocletiann commented 4 months ago

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

b0o commented 4 months ago

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

diocletiann commented 4 months ago

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 commented 4 months ago

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