Skip to content

Slow reponse to scroll and typing #107016

Open

Description

@RLesma

Issue Type: Performance Issue

It is not slow to start-up, it is slow to do anything in the text editor (scroll, find, type, etc). For example, when scrolling, the screen is unable to keep up with the mouse wheel and it will keep scrolling for a while after I stop the mouse wheel. I disabled the extensions I installed lately, and also reduced the amount of files in the workspace.

VS Code version: Code 1.49.1 (58bb7b2, 2020-09-16T23:27:51.792Z)
OS version: Windows_NT x64 10.0.19041

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 11.85GB (4.20GB free)
Process Argv --crash-reporter-id 2c01e348-504e-456f-931c-280aa8926a03
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    2	    96	 33588	code main
    2	    88	 13340	   shared-process
    3	    84	 26656	   window (Issue Reporter)
    0	    24	 27836	   crashpad-handler
    0	   223	 30908	   window (Settings - local_svn_workspace (Workspace) - Visual Studio Code)
    0	    11	  6640	     watcherService 
    0	     6	 12092	       console-window-host (Windows internal process)
    0	     6	  9240	     console-window-host (Windows internal process)
    0	    96	 19504	     extensionHost
    0	    69	 30740	     C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0	    60	 30924	   utility
    1	   241	 33368	   gpu-process
Workspace Info
|  Window (Settings - local_svn_workspace (Workspace) - Visual Studio Code)
|    Folder (JESD204): 1760 files
|      File types: svn-base(998) v(161) sv(38) sh(33) tcl(30) prj(30) do(25)
|                  tmp(9) txt(9) log(7)
|      Conf files: makefile(7);
Extensions (11)
Extension Author (truncated) Version
better-comments aar 2.1.0
bracket-pair-colorizer Coe 1.0.61
ctags-support jay 1.0.19
svn-scm joh 2.12.4
rainbow-csv mec 1.7.1
remote-ssh ms- 0.55.0
remote-ssh-edit ms- 0.55.0
remote-wsl ms- 0.44.5
veriloghdl msh 1.3.3
awesome-vhdl puo 0.0.1
tcl ras 0.1.0

Activity

  1. alexdima commented on Sep 18, 2020

    @alexdima
    Member

    RLesma Does this reproduce when disabling all extensions? Press F1 and then choose Developer: Reload Window with Extensions Disabled

    Kapture 2020-07-20 at 15 28 23

  2. added
    info-needed
    on Sep 18, 2020
  3. jonas-jonas commented on Sep 20, 2020

    @jonas-jonas

    I do have this issue now too. I don't think I had in any previous version. My observations:

    Edit: My "about" information:
    Version: 1.49.0 (user setup)
    Commit: e790b93
    Date: 2020-09-10T13:22:08.892Z
    Electron: 9.2.1
    Chrome: 83.0.4103.122
    Node.js: 12.14.1
    V8: 8.3.110.13-electron.0
    OS: Windows_NT x64 10.0.19041

    Hope this helps!

  4. EusthEnoptEron commented on Sep 21, 2020

    @EusthEnoptEron

    I also noticed some lagginess when typing / scrolling on my end (1.49.1).

    • Downgrading to 1.48.2 seems to have fixed the issue for me.
    • I also tried upgrading to 1.49.1 again, but it was still as laggy, so I went back to 1.48.2.
  5. krenton commented on Sep 21, 2020

    @krenton

    Experiencing the same problem. My about info:

    Version: 1.49.1 (user setup)
    Commit: 58bb7b2331731bf72587010e943852e13e6fd3cf
    Date: 2020-09-16T23:27:51.792Z
    Electron: 9.2.1
    Chrome: 83.0.4103.122
    Node.js: 12.14.1
    V8: 8.3.110.13-electron.0
    OS: Windows_NT x64 10.0.19041
    

    Significant performance drop when editing files that have some sort of syntax highlighting.
    XML files were the worst; markdown was fine, but got worse when I added code snippets.

    Recorded performance while typing/scrolling and saw a lot of warnings about "cumulative layout shift".
    Downgraded to version 1.48.2 - the problem is gone. Also no more "cumulative layout shift" warnings in performance recordings.

    Edit:
    Actually checked: version 1.48.2 does have a small typing delay for me. Switching to 1.47.3 turned out to be the best experience.

  6. RLesma commented on Sep 22, 2020

    @RLesma
    Author

    RLesma Does this reproduce when disabling all extensions? Press F1 and then choose Developer: Reload Window with Extensions Disabled

    Kapture 2020-07-20 at 15 28 23

    I just did that, and it is still slow. Definitely not an extension issue.

  7. RLesma commented on Sep 22, 2020

    @RLesma
    Author

    Downgrading to 1.48.2 also solved the issue for me.

  8. alexdima commented on Sep 22, 2020

    @alexdima
    Member

    Robo (@deepak1556) Would you need more info here ? (this seems similar to #106456 , #106939 which are all on Windows)

  9. 147 remaining items

  10. rynoV commented on Aug 17, 2023

    @rynoV

    I'm also noticing this issue, it seems to be caused by higher resolution, when I switch my monitor's resolution from 3840x2160 to 1920x1080 I see an immediate speed up in VSCode

    Let me know and I can provide more details

  11. LucaMarconato commented on Sep 21, 2023

    @LucaMarconato

    For me setting editor.hover.delay to 20 (it was 10), helped.

  12. kurtextrem commented on Jan 6, 2024

    @kurtextrem

    An easy fix is to add the vscode binary to the Google Chrome nvidia profile. This automatically applies all hidden settings in the nvidia profile to it.

    image

  13. notmalicik commented on Feb 3, 2024

    @notmalicik

    if you have a laptop try to change vscode from using gpu to cpu, worked for me

  14. rynoV commented on Feb 7, 2024

    @rynoV

    if you have a laptop try to change vscode from using gpu to cpu, worked for me

    Thanks! With code --disable-renderer-accessibility --disable-gpu I saw an improvement even at high resolution, although there's still a bit of lag but that could be something else

    I think I tried this before, but I may not have completely closed vscode before running with the new flags

  15. tadghh commented on Feb 12, 2024

    @tadghh

    Other launch options for future lurkers
    vscodium.cmd --disable-gpu --disable-software-rasterizer --disable-http2 --disable-http-cache --force_low_power_gpu --use-gl=egl

  16. iacullo-atri commented on Jun 4, 2024

    @iacullo-atri

    --disable-renderer-accessibility by itself fixed my scrolling issues.

  17. JHartzer commented on Jun 19, 2024

    @JHartzer

    Another data point: code-insiders --disable-renderer-accessibility resolved these issues for me as well

  18. nathanredblur commented on Aug 2, 2024

    @nathanredblur

    My vscode is very slow when you move the cursor with keys from left to right.
    I try to investigate why, but this beats me.
    CleanShot 2024-08-01 at 21 47 11

    CleanShot.2024-08-01.at.21.53.06.mp4
  19. tadghh commented on Aug 2, 2024

    @tadghh

    My vscode is very slow when you move the cursor with keys from left to right. I try to investigate why, but this beats me. CleanShot 2024-08-01 at 21 47 11
    CleanShot.2024-08-01.at.21.53.06.mp4

    Could be caused by Nvidias power saving "WhisperMode/BatteryBoost" feature. It limits the fps to 30 even on Windows balanced power profile.

  20. MarFre22 commented on Aug 20, 2024

    @MarFre22

    Thanks for all your tips!
    Although I use VSCodium on Mac, I followed the ones recommended by Nick Iacullo (@iacullo-atri) ethan (@tadghh) JHartzer Calum Sieppert (@rynoV) and it worked very well!

    I've also made a customised shortcut, in AppleScript, which makes it possible to run with the aforementioned arguments (I used (--disable-gpu --disable-software-rasterizer --disable-http2 --disable-http-cache --force_low_power_gpu --use-gl=egl) via the Dock, Launchpad or Spotlight and via a file ("always open with...").
    In practice, I don't need to use the original shortcut.

    Only Compatible with MacOS, tested on Sonoma version 14.5.
    It should be compatible with VSCode, you just need to change /Applications/VSCodium.app/Contents/Resources/app/bin/codium (blank space at the end!).

    I hope it helps someone!

    AppleScript code below, use the Script Editor and save as an app.

    on open fileList
    	-- Execute when the application is started from a file (by finder)
    	repeat with aFile in fileList
    		set filePath to POSIX path of aFile
    		do shell script "/Applications/VSCodium.app/Contents/Resources/app/bin/codium " & quoted form of filePath & " --args --disable-gpu --disable-software-rasterizer --disable-http2 --disable-http-cache --force_low_power_gpu --use-gl=eg"
    	end repeat
    end open
    
    on run
    	-- Execute when the application is launched from the Dock/Spotlight (without any files)
    	do shell script "/Applications/VSCodium.app/Contents/Resources/app/bin/codium --args --disable-gpu --disable-software-rasterizer --disable-http2 --disable-http-cache --force_low_power_gpu --use-gl=egl"
    end run
  21. egorlepa commented on Jan 9, 2025

    @egorlepa

    An easy fix is to add the vscode binary to the Google Chrome nvidia profile. This automatically applies all hidden settings in the nvidia profile to it.

    image

    oh wow, thank you! this almost made me forgot i'm using junky electron garbage, feels like native app now.

  22. nathanredblur commented on Jan 14, 2025

    @nathanredblur

    My vscode is very slow when you move the cursor with keys from left to right. I try to investigate why, but this beats me. CleanShot 2024-08-01 at 21 47 11
    CleanShot.2024-08-01.at.21.53.06.mp4

    Could be caused by Nvidias power saving "WhisperMode/BatteryBoost" feature. It limits the fps to 30 even on Windows balanced power profile.

    I'm using mac, so, not sure.

  23. artsparkAI commented on May 3, 2025

    @artsparkAI

    I am on Ubuntu, I also had problems with vscode on my high res (3840 x 2160) monitor.
    I believe I found a fix, I changed my Nvidia settings from "Adaptive" to "Prefer maximum performance":

    Image

    I'm not getting any lag now, we'll see if it holds up.

    Also putting as many things as possible into "extensions.experimental.affinity" also helped a bit (This can cause weird issues, this may not be a safe config TBH):

        "extensions.experimental.affinity": {
            "vscodevim.vim": 1,
            "anysphere.cursor-retrieval": 2,
            "anysphere.cursor-always-local": 2,
            "anysphere.cursor-tokenize": 2,
            "anysphere.cursor-shadow-workspace": 2,
    
            "vscode.git": 3,
            "vscode.github": 3,
            "vscode.github-authentication": 3,
            "vscode.npm": 3,
            "vscode.git-base": 3,
    
            "vscode.json-language-features": 4,
            "vscode.typescript-language-features": 4,
            "vscode.configuration-editing": 4,
            "vscode.merge-conflict": 4,
            "bradlc.vscode-tailwindcss": 4,
    
            "vscode.debug-auto-launch": 5,
            "mtxr.sqltools": 5,
            "mtxr.sqltools-driver-pg": 5
        }
    
    

    Update: Found the real issue I believe. I was running Cursor on a regular disk drive (Not SSD), and frequent saves of agent history to disk were causing enormous blocking delays. Moving everything to NVME seems to have fixed the issue.

  24. 4-FLOSS-Free-Libre-Open-Source-Software commented on Aug 5, 2026

    @4-FLOSS-Free-Libre-Open-Source-Software

    An easy fix is to add the vscode binary to the Google Chrome nvidia profile. This automatically applies all hidden settings in the nvidia profile to it.

    image

    There already is a NVIDIA predefined profile for code.exe "VS Code Al Toolkit"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

accessibilitybugmitigatedperfwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions