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 issue, nvim + osx #296

Open
reynn opened this issue Apr 21, 2021 · 10 comments
Open

Performance issue, nvim + osx #296

reynn opened this issue Apr 21, 2021 · 10 comments

Comments

@reynn
Copy link

reynn commented Apr 21, 2021

Really enjoying the project so far awesome work!

I am seeing some performance issues when running NVIM in Zellij, when scrolling rapidly through a file all of Zellij starts lagging. In another tab this runs pretty smoothly. I've been able to replicate the issue in Alacritty, iTerm2 and the builtin OSX terminal.

The first video here is how scrolling looks on the machine without going through Zellig, second is within.

Let me know how I can help troubleshoot or with doing rust debugging, if you need it.

zellig-wo-nvim-performance.mov
zellig-nvim-performance.mov
@keeslinp
Copy link

I saw similar issues. Might be worthwhile to see if shrinking the alacritty window makes it faster. It sounds like the whole window gets redrawn every frame so the larger the window the more has to be "touched" in each render.

@TheAlgorythm
Copy link

I have the same problems on macOS on bat/less and even tipping in the command prompt with autosuggestions at fullscreen with 2560 × 1600 pixels.
If I decrease the size, the effect is significantly less (pun intended) noticeable.

@imsnif
Copy link
Member

imsnif commented May 14, 2021

@reynn - while Zellij has some performance problems (as @keeslinp mentioned) this looks especially bad and I'm afraid you hit some sort of hidden edge-case that I'm not (and want to at least be) aware of.

Would you be willing to help me out debug this? I can't reproduce this with neovim on my box, so it might be something particular to your neovim setup. If you follow the instructions here and attach the log files (especially the pane logs, eg. zellij-3.log), I'd probably be able to use them to re-create the issue on my machine: https://github.com/zellij-org/zellij/blob/main/.github/ISSUE_TEMPLATE/bug_report.md

With the --debug flag, just scroll down once and then quit zellij. That should be enough for me to see this as well.
Much appreciated!

@raphCode
Copy link
Contributor

Hey, is still happening with current zellij versions?
@TheAlgorythm @keeslinp @reynn

@TheAlgorythm
Copy link

TheAlgorythm commented Apr 28, 2022

It is definitely much better (on the same underpowered MacBook). It's maybe a little more stuttering than without it, but it is nearly unnoticeable.

@keeslinp
Copy link

I would agree that it is a lot better (I'm also on a faster computer now), but it is definitely still noticeable compared to just using kitty tabs or tmux.

@imsnif
Copy link
Member

imsnif commented Apr 28, 2022

I have a tiny suspicion, I wonder if you'll be willing to help me check it?
Does this happen if the background of neovim is the same color as the background of your terminal?

Otherwise, if one of you would be willing to attach debug logs using the bug report template: #1358 it would be very helpful (please also be sure to include the tput lines and tput cols output inside the pane before opening neovim). That way I can reproduce this on my own machine and find out exactly what the issue is.

@imsnif
Copy link
Member

imsnif commented Jul 12, 2022

Anyone experiencing this issue and willing to help debug? For the life of my I can't reproduce it no matter what I try :) Maybe @tlinford ?

@raphCode
Copy link
Contributor

raphCode commented Jul 12, 2022

I looked into profiling and I believe perf could probably yield some insights where time is spent:

Make a debug build, run it and set up the reproducer with the performance issues, then run:
perf record --stat -g --pid=$(pgrep zellij | paste -sd ,)
Please make sure there is only one zellij session and a single client, otherwise specify the pids of the relevant processes (server and client) manually: --pid=1,2,1337.
While this is recording, trigger the performance problem inside zellij.
Stop recording with Ctrl-C.

Finally, package up the recorded data with
perf archive
and upload the file here (should only have a couple of MB).
Please also note the commit / branch / version you build from so I can compare.

@quolpr
Copy link

quolpr commented Jun 12, 2024

I decided to compare performance of fast scroll with tmux, and zellij is sluggish here(I just press c-d, c-u). Watch the video:

Screen.Recording.2024-06-12.at.22.44.50.mov

Here how it works with tmux:

out4.mp4

It struggles too, but still, it's not as sluggish as with zellij.

I am using alacritty + latest zellij with default config on macos 14.5 m1 max

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

6 participants