microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.25k stars 28.88k forks source link

Long lines horizontal scrolling broken #172760

Open jrieken opened 1 year ago

jrieken commented 1 year ago
jrieken commented 1 year ago

Sharing video and file

https://user-images.githubusercontent.com/1794099/215524867-05858466-dc0e-487a-84ca-81152dd376a7.mov

workbench.desktop.main.js.zip

rebornix commented 1 year ago

Synced offline and there are additional settings that being used in the setup:

With the second setting, ViewLine will not use the fast FastRenderedViewLine so https://github.com/microsoft/vscode/commit/3ebfaadb9b856e58eef7d84d177a98dc6c149146 or https://github.com/microsoft/vscode/commit/b229eb5fa2ecadb8a5238ccb9f6f49f7ccba9d2b have no impact on this issue. However it's possibly related to the new whitespace rendering https://github.com/microsoft/vscode/pull/

I didn't reproduce this issue, @hediet it would be great if you can also give it a try. @jrieken if you can reproduce again, it would be help if you can try to turn off following settings to help narrow down the root cause

rebornix commented 1 year ago
image

I'm seeing slowness while working on long lines. useMonospaceOptimizations: false so it's using RenderViewLine. From the perf log, most time is spent in browser HitTest

jrieken commented 1 year ago

@rebornix Thanks for investigating. btw - I am fine to remove this from the candidate milestone. This seems harder to reproduce that I initially thought

n-gist commented 1 year ago

@jrieken @rebornix I'm experiencing horizontal scrolling bug starting from current release (1.75.1) or maybe one release earlier. Wasn't sure how to reproduce it exactly, but looks like I have found it. In the video I'm pressing Home/End buttons. The issue appears when the vertical scroller is not at zero position. It takes more than one Home/End presses to make horizontal scroller reach its destination. The longer the line, the more presses are needed. Have checked these settings with no effect: editor.fontFamily editor.fontLigatures editor.experimentalWhitespaceRendering editor.renderWhitespace

hbug

n-gist commented 1 year ago

As of 1.76 the issue (my previous comment) still there, have spent some time finding the source of it by filtering my settings file, found that the setting causing the issue is editor.smoothScrolling set to true

FreeWall commented 1 year ago

@n-gist Same issue for me, when the vertical scroller is on top, it works fine - its smooth. When it's not on top, it's laggy when I horizontal scroll, it's driving me crazy when you work with long lines. Yes, disabling editor.smoothScrolling will fix this, but I want smooth scroll :D Interesting thing is, I use VSCode on 2 machines with the same settings, same extensions, same vscode version (using GitHub Sync) and I can reproduce this bug only on one of them.

alexdima commented 1 year ago

@n-gist @FreeWall We were able to get reproducible steps and track down the root problem related to editor.smoothScrolling in https://github.com/microsoft/vscode/issues/179368#issuecomment-1499293621 . Let's continue tracking that in #179368, a PR with a fix is under way.

This particular issue is about not seeing the text being rendered immediately when scrolling left and then the text suddenly appearing.

FreeWall commented 1 year ago

Upgraded to v1.80.0 and it's fixed for me, no more laggy scrolling 👍 thx