Intermittent: Lag With Sticky Scroll After Prolonged Use
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
I don't know how to fully reproduce this bug, but at some point the application becomes noticeably laggy, only when VSCodeVim is installed.
In this "laggy" state, when sticky scroll lines of code are visible (editor.stickyScroll.enabled must be set to true, which it is by default on VSCode) it becomes incredibly laggy to move the cursor.
This issue has been observed by another user in another performance issue thread:
I noticed that the laggy scrolling with
j/kwould happen more when the "sticky scrolling" pane would appear at the top, such as navigating within nested methods or HTML tags. Hiding the sticky scrolling section (right-click inside the pane, uncheck the option) significantly improved the performance of vim for me, in case that helps anyone else! Annoying to need to do this, but it was getting to the point where I was restarting the window at least once an hour.
Originally posted by @jhobz in #3957
To Reproduce
Again, I'm not sure how to reproduce the laggy state, but after using VSCode with the editor.stickyScroll.enabled setting set to true for some time (like 30-60 min?) moving the cursor under a visible sticky scroll line(s) will be excruciatingly slow.
(Again, while in the triggered laggy state) here's how to trigger the lag:
- Create a new file using
ctrl+shift+pandCreate: new file... - Save file as
lol.json - Paste some sort of nested
jsonstructure:
{
"lol": {
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1,
"lol": 1
}
}
- Scroll down until
"lol": {is visible as a sticky scroll - Click
ja few times, and observe insane lag
I tried this with a basic python and markdown file and observed the same behavior, and presume that any language that has sticky scroll should be able to trigger this lag.
Screenshots
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.30.1
- VSCode version: 1.102.0
- OS: Windows 11 24H2
Additional context
Very interestingly in the laggy state, when a file isn't saved or on disk, and the sticky scroller is visible, the performance lag doesn't occur.
For example, try doing the reproduction steps while in the laggy state, but skip step 3. Instead, click on the highlighted "Select a language" text in the editor, and select JSON. No performance lag is observed. But once the file is saved, the lag occurs.
Comments
I feel like sticky scroll + vim isn't that uncommon of a combination in VSCode, especially considering that sticky scroll is enabled by default. Admittedly this bug has brought me a lot of frustration with VSCodeVim before realizing sticky scroll may exacerbate the lag. Thanks for making this project, I don't know if I'll be keeping sticky scroll on to find the reproduction steps, but hopefully someone else is able to find this if they see the same issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the lag in VSCodeVim with editor.stickyScroll.enabled enabled, using the saved nested JSON example and cursor movement with j/k; compare it with an unsaved file. Investigate the difference between saved and unsaved files, and consider the issue done when cursor movement remains responsive with visible sticky scroll after prolonged use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100