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 causes significant performance drops #123344

Closed
ok-nick opened this issue May 8, 2021 · 17 comments
Closed

Scrolling causes significant performance drops #123344

ok-nick opened this issue May 8, 2021 · 17 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@ok-nick
Copy link

ok-nick commented May 8, 2021

Issue Type: Performance Issue

Earlier today I've been having a huge performance drop when scrolling in the editor tab, extension tab, anywhere that scrolls. Whether smooth scroll is toggled or all extensions are disabled, VSCode drops all the way to ~20fps. I've tried reinstalling and restarting to no avail.
I'd be glad to provide profiling logs if needed although I've noticed something specifically pop up in red a bunch of times which may seem alarming?
image

VS Code version: Code 1.56.0 (cfa2e21, 2021-05-04T22:09:06.405Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 x 2304)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.90GB (8.47GB free)
Process Argv --crash-reporter-id e643c37a-8eb9-4486-a629-28107525d35f
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	   118	 17004	code main
    4	   161	  4692	   gpu-process
    0	    24	  5720	   crashpad-handler
    0	    39	  6728	   utility
    1	    95	  7400	   shared-process
    0	    60	 20940	     ptyHost
    0	    81	 12728	   utility
    0	   180	 18948	   window (● Untitled-1 - Visual Studio Code)
    0	   233	 12212	     extensionHost
    0	    42	 19564	       c:\Users\nicky\.vscode\extensions\nightrains.robloxlsp-0.15.8\server\bin\Windows\lua-language-server.exe -E -e DEVELOP=undefined;DBGPORT=undefined;DBGWAIT=undefined c:\Users\nicky\.vscode\extensions\nightrains.robloxlsp-0.15.8\server\main.lua
    0	    11	 22928	         console-window-host (Windows internal process)
    0	    93	 23408	       electron_node server.js 
    0	    84	 23320	   window (Issue Reporter)
Workspace Info
;
Extensions (25)
Extension Author (truncated) Version
project-manager ale 12.1.0
better-toml bun 0.3.2
bracket-pair-colorizer-2 Coe 0.2.0
vscode-markdownlint Dav 0.40.4
vscode-eslint dba 2.1.20
gitlens eam 11.4.1
EditorConfig Edi 0.16.4
vscode-great-icons emm 2.1.73
prettier-vscode esb 6.3.2
vscode-rojo eva 1.13.1
stylua Joh 1.2.0
selene-vscode Kam 1.0.3
rust-analyzer mat 0.2.583
prettify-json moh 0.0.3
vsliveshare ms- 1.0.4131
color-highlight nau 2.3.0
robloxlsp Nig 0.15.8
java red 0.79.1
vscode-yaml red 0.18.0
vscode-roblox-ts rob 1.1.2
crates ser 0.5.9
swdc-vscode sof 2.5.13
code-spell-checker str 1.10.2
errorlens use 3.2.6
vscode-java-debug vsc 0.33.1

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt700cf:30270857
pythonvspyt602:30294772
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes516:30244333
pythonvsnew554cf:30291488
pythontb:30283811
pythonvspyt551:30291414
vspre833:30267464
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vscoreces:30290705
pythondataviewer:30285071
vscus158:30286553
vscgsv2:30294352

@ok-nick ok-nick changed the title . Scrolling in vscode causes significant performance issues May 8, 2021
@ok-nick ok-nick changed the title Scrolling in vscode causes significant performance issues Scrolling in editor causes significant performance drops May 8, 2021
@ok-nick ok-nick changed the title Scrolling in editor causes significant performance drops Scrolling causes significant performance drops May 8, 2021
@alexdima
Copy link
Member

alexdima commented Jun 7, 2021

@ok-nick How are you measuring frame rate? Some of the developer tools, depending on the settings used will reduce the frame rate of the page just by recording the events / stack traces / screenshots / etc.

I personally use this tool to measure frame rate, as it does not impact the frame rate:
image

image

@alexdima alexdima added the info-needed Issue requires more information from poster label Jun 7, 2021
@ok-nick
Copy link
Author

ok-nick commented Jun 7, 2021

It is extremely clear visually, while in the editor, that there is a huge performance drop as I scroll. Here is a gif of me scrolling using what you've suggested.
AiAJ0CerGq

@alexdima
Copy link
Member

alexdima commented Jun 9, 2021

@ok-nick We have a known problem on Windows that might cause slowness (#107016). Could you please try to close all vscode windows and then launch with code --disable-renderer-accessibility ?

@ok-nick
Copy link
Author

ok-nick commented Jun 10, 2021

Unfortunately it didn't seem to change anything.

@alexdima
Copy link
Member

Thank you for trying. Some of the extensions you have installed (e.g. bracket-pair-colorizer-2) might add a lot of text editor decorations which might slow down the editor rendering, depending on your content. Does this reproduce when disabling all extensions?

@ok-nick
Copy link
Author

ok-nick commented Jun 10, 2021

Yes, the issue still happens when all extensions are disabled.

@alexdima
Copy link
Member

Thanks for trying. Could you please create a JS CPU profile for the renderer when you are scrolling using these steps?

@ok-nick
Copy link
Author

ok-nick commented Jun 10, 2021

CPU-20210610T180252.zip

@alexdima
Copy link
Member

Thank you for the profile. I could not spot anything wrong, it looks like the JS that renders a frame is actually pretty fast on your machine, taking almost always <5ms to render a frame, which should give a great frame rate. IMHO the problem might be somewhere else, not on the renderer process.

@ok-nick To eliminate the problem that this is a GPU / driver issue, could you please also try to close all vscode windows and launch Code.exe --disable-gpu and see if there is any improvement.

Otherwise, this could be a problem with the main process which maybe does not send the user input events to the renderer process fast enough.

@ok-nick
Copy link
Author

ok-nick commented Jun 11, 2021

The --disable-gpu flag allows it to run perfectly, absolutely no lag

@alexdima
Copy link
Member

@deepak1556 Any thoughts on how to proceed?

@alexdima alexdima assigned deepak1556 and unassigned alexdima Jun 11, 2021
@alexdima alexdima added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed info-needed Issue requires more information from poster labels Jun 11, 2021
@deepak1556
Copy link
Collaborator

Does this issue repro with latest stable 1.74 ?

@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Dec 12, 2022
@ok-nick
Copy link
Author

ok-nick commented Dec 12, 2022

It seems to be fixed! 👍

@deepak1556 Do you know which PR fixed the issue?

@ok-nick ok-nick closed this as completed Dec 12, 2022
@deepak1556
Copy link
Collaborator

Not sure, we have had a couple of runtime version updates since the bug reported, very likely fixed through them.

@ok-nick
Copy link
Author

ok-nick commented Dec 23, 2022

The issue still persists. I must've opened it with the --disable-gpu flag which is why I thought it was fixed.

@ok-nick ok-nick reopened this Dec 23, 2022
@deepak1556
Copy link
Collaborator

@ok-nick can you check if the issue is present with our exploration build that comes with a newer runtime. Thanks!

@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants