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 in text editors like nano/vim is jittery/jerky, framerate seems inconsistent #3793

Open
insidewhy opened this issue Nov 19, 2024 · 4 comments

Comments

@insidewhy
Copy link

insidewhy commented Nov 19, 2024

zellij --version: zellij 0.41.1

stty size: 34 116

uname -av: Linux rats 6.11.8-arch1-2 #1 SMP PREEMPT_DYNAMIC Fri, 15 Nov 2024 15:35:07 +0000 x86_64 GNU/Linux

Issue description

Scrolling in neovim by holding j or k looks choppy, or in nano by holding <up> or <down>, like the framerate is tanking. Outside of zellij (or in tmux) everything looks smooth and consistent. This happens with an empty (default) neovim configuration (e.g. nvim --clean) but given it happens in nano also I guess it's not specific to any editor or app with fast scrolling.

Minimal reproduction

  1. Run nvim --clean <large file>
  2. Scroll downwards by holding j.
  3. Notice the scroll is choppy and not smooth like it is when doing the same action outside of zellij.
  4. Notice the same thing happens when using nano <large file> and holding the down arrow.

Other relevant information

Rendering within neovim in general seems quite a lot slower, for example with :set showcmd, outside of zellij the updates are so quick you never even glimpse the echod commands, but with zellij they are commonly visible.

I used time nvim <large file> and scrolled to the bottom before exiting, and the times were approximately the same whether inside of zellij or not, so it only seems the rendering is affected and not the actual speed of scrolling.

This issue does not occur with tmux.

Also note I have a fast/modern CPU:

cat /proc/cpuinfo | head -n 9
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 170
model name      : Intel(R) Core(TM) Ultra 9 185H
stepping        : 4
microcode       : 0x20
cpu MHz         : 2000.651
cache size      : 24576 KB
@insidewhy insidewhy changed the title scrolling in text editors like nano/vim is jittery/jerky, framerate seems laggy scrolling in text editors like nano/vim is jittery/jerky, framerate seems inconsistent Nov 19, 2024
@insidewhy insidewhy changed the title scrolling in text editors like nano/vim is jittery/jerky, framerate seems inconsistent Scrolling in text editors like nano/vim is jittery/jerky, framerate seems inconsistent Nov 19, 2024
@insidewhy
Copy link
Author

The render performance of zellij was a little below what I could tolerate, so I spent a while customising kitty instead and will use tmux when I have to for now, it's inconvenient that it doesn't yet support the kitty keyboard protocol but at least the render performance is adequate for me.

I wrote a kitten to forward my next/previous/create tab arguments to tmux if it's running, otherwise use native kitty tabs. And some other python to customise the kitty tab bar. So now whether I'm using kitty, tmux or zellij everything looks the same.

@koalazub
Copy link

Is this related to #2548? Would merging this help address issues related to scrolling

@insidewhy
Copy link
Author

Is this related to #2548? Would merging this help address issues related to scrolling

I have no idea, I'll try it

@insidewhy
Copy link
Author

insidewhy commented Nov 20, 2024

@koalazub Yeah that really improve performance for me (I tried main vs main with the commit from that PR rebased). Oh no it's been left unmerged since more than a year ago :(

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

No branches or pull requests

2 participants