-
Notifications
You must be signed in to change notification settings - Fork 282
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
Large window size makes the UI slow and choppy #1285
Comments
This is possibly related to perf limits in revery. May be significantly helped by the skia integration at #1206 Would you be able to test using that PR and see if the perf issues are improved? It may have other bugs but that would at least help see if that's the issue |
I tried to build from source, but I'm getting the error Edit: Seems like there is a revery dependency that requires Ubuntu 18.10 (im on 18.04). I am not sure if that is the problem, but I cannot really add packages to my sources since this is a work computer. I guess I will have to wait until the PR is merged and released to try it out. |
Weird, I'd think we'd support at least latest Ubuntu LTS. What package does it require? |
CI is done on 16.04, but there is some packages required on Ubuntu (both for |
For this error:
might be worth We just recently (yesterday) merged in Skia (#1206), which is basically a total revamp of our rendering pipeline - it'll be interesting to see how it works in this scenario. Hopefully improved! |
As just some additional data points, here is what I get on the latest build from the Early Access portal (#0c4cddea), at 4K (no scaling) on Windows in full screen, and I am just holding
I can at least see that in a realistic example, having a larger window, even if no extra text is shown, we do lose performance. I can also see that if I drop to a smaller window with an empty buffer I get like 700 FPS and a bunch of CPU/GPU usage, so I'm guessing we have no detection around "probably don't need to repaint now". |
Thanks for the great benchmarks, @CrossR ! Still some work to do - these cases should all be 60 FPS. I measured with the latest, and it turns out, the next bottlenecks are actually not rendering - but expensive text manipulation we're doing every render frame. The two biggest culprits I see are:
@glennsl is currently working on some With skia, now, we can also have a benchmark around the |
So I tested the latest build on my work computer today, and while it does seem to distribute workload much more evenly across cpu threads, the issue with poor visual performance at large screen size remains. I don't have any hard numbers, but cpu and memory usage seems to be extremely similar at a small window size that runs smoothly and a large one that runs terribly, so to me it seems like inefficiencies of memory allocations between frame renders is perhaps not the real issue. By the way, I notice no difference when disabling the mini map in config. |
Thanks for the details, @karlc1 ! Indeed, it does sound like a different issue based on your description. One other issue that can occur is if we happen to be using software rendering instead of leveraging the GPU - you said you're running Ubuntu 18.04, what kind of GPU do you use? And any window manager? If you wouldn't mind grabbing some logs - running with
I'd be curious what we're picking up for the OpenGL version/vendor. I wonder if we're hitting the software renderer by chance. Another piece of logging that would be useful is to run with
Might give us some clues on where the bottleneck is. |
with small window:
I got these logs using Ubuntu on Wayland, but I have had the same experience with Xorg |
Thanks for the help with the logs, @karlc1 ! It's actually very helpful. It seems like the bottleneck we're seeing is in the reconcile phase of our rendering:
So actually not related to OpenGL / Skia / or the memory issue I mentioned before. The draw time for the small window is still higher than I'd like to see (we'd prefer that to be under 8ms), but the main bottleneck for the large window is that reconcile step at 36ms. We expect this to be ~1-2ms to be within the 60 FPS goals, but 36ms exceeds that by a wide, wide margin. I suspect this could be related to the file explorer - it's the heaviest 'reconcile' path today. I wonder if we're hitting some degenerate case that is causing the reconciler to spend a lot of time in the file explorer - perhaps a deeply nested path. We might want to consider an 'immediate-mode' rendering for the file explorer, like we do for the editor surface / minimap today - so that we can avoid any reconciler cost there. |
I'm not sure if this is known, but something is up with the rendering. If I use a maximized window of onivim, the cursor moves super slow and choppy, skipping rows and continue registering key presses after hold and release of any navigation key. The performance seem to be directly correlated with the size of the window. At full screen on 3440x1440 resolution, the UI is more or less unusable.
I am not sure if this is related, but from what I can see in htop is, as I move the cursor, one of the eight threads of my CPU spikes immediately to 100% while the others remain largely unaffected. This is however the case regardless of client size, so it might be a separate issue. I'm not sure weather performance is single threaded by design or if it would benefit from multi threading more, but regardless it seems excessive that moving the cursor would use up an entire cpu thread.
I'm using Ubuntu 18.04 and has experienced this with every build I've tried, including one I downloaded today.
The text was updated successfully, but these errors were encountered: