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

Slow reponse to scroll and typing #107016

Open
RLesma opened this issue Sep 18, 2020 · 140 comments
Open

Slow reponse to scroll and typing #107016

RLesma opened this issue Sep 18, 2020 · 140 comments
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug mitigated Issue has workaround in place perf windows VS Code on Windows issues

Comments

@RLesma
Copy link

RLesma commented Sep 18, 2020

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
@alexdima
Copy link
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

@alexdima alexdima added the info-needed Issue requires more information from poster label Sep 18, 2020
@jonas-jonas
Copy link

jonas-jonas commented Sep 20, 2020

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

  • It's fine when the file is small (50 lines is fine)
  • File type did not matter, I had the issue in a lorem ipsum filled txt file
  • Slow when all extensions are disabled, I coincidentally had to reinstall my OS (Windows 10) yesterday and the issue persists.
  • I did a performance monitoring run while fast scrolling through a 700 lines file (lorem ipsum text) with extensions disabled and FPS dropped to 0 at some point. The results are here: https://gist.github.com/jonas-jonas/b0915211b146619cfbffeceed5deb117

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!

@EusthEnoptEron
Copy link

EusthEnoptEron commented Sep 21, 2020

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.

@krenton
Copy link

krenton commented Sep 21, 2020

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.

@RLesma
Copy link
Author

RLesma commented Sep 22, 2020

@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.

@RLesma
Copy link
Author

RLesma commented Sep 22, 2020

Downgrading to 1.48.2 also solved the issue for me.

@alexdima alexdima added windows VS Code on Windows issues electron-9-update labels Sep 22, 2020
@alexdima
Copy link
Member

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

@deepak1556
Copy link
Collaborator

Thanks to the traces from @Minkyu-Choi and @Perh0rd , I was able to see a problematic area during the scroll operation.

Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::AccessibilityIsIgnored
Code - Insiders.exe!blink::AXObjectCacheImpl::FireAXEventImmediately
Code - Insiders.exe!blink::AXNodeObject::ChildrenChanged
Code - Insiders.exe!blink::AXObjectCacheImpl::ChildrenChanged
Code - Insiders.exe!blink::AXObjectCacheImpl::FireTreeUpdatedEventImmediately
Code - Insiders.exe!blink::AXObjectCacheImpl::ProcessUpdates
Code - Insiders.exe!blink::AXObjectCacheImpl::ProcessDeferredAccessibilityEvents
Code - Insiders.exe!blink::LocalFrameView::ForAllNonThrottledLocalFrameViews<`lambda at ../../third_party/blink/renderer/core/frame/local_frame_view.cc:2664:37'>
Code - Insiders.exe!blink::LocalFrameView::RunAccessibilityLifecyclePhase
Code - Insiders.exe!blink::LocalFrameView::UpdateLifecyclePhasesInternal
Code - Insiders.exe!blink::LocalFrameView::UpdateLifecyclePhases
Code - Insiders.exe!blink::PageAnimator::UpdateAllLifecyclePhases
Code - Insiders.exe!blink::WebViewImpl::UpdateLifecycle
Code - Insiders.exe!blink::WidgetBase::UpdateVisualState
Code - Insiders.exe!cc::LayerTreeHost::RequestMainFrameUpdate
Code - Insiders.exe!cc::ProxyMain::BeginMainFrame
Code - Insiders.exe!base::internal::Invoker<base::internal::BindState<void (cc::ProxyMain::*)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState,std::__1::default_delete<cc::BeginMainFrameAndCommitState>>),base::WeakPtr<cc::ProxyMain>,std::__1::unique_ptr<cc::BeginMainFrameAndCommitState,std::__1::default_delete<cc::BeginMainFrameAndCommitState>>>,void ()>::RunOnce
Code - Insiders.exe!base::TaskAnnotator::RunTask
Code - Insiders.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl
Code - Insiders.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork
Code - Insiders.exe!base::MessagePumpDefault::Run
Code - Insiders.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run
Code - Insiders.exe!base::RunLoop::Run
Code - Insiders.exe!content::RendererMain
Code - Insiders.exe!content::ContentMainRunnerImpl::Run
Code - Insiders.exe!service_manager::Main
Code - Insiders.exe!content::ContentMain
Code - Insiders.exe!wWinMain
Code - Insiders.exe!__scrt_common_main_seh
kernel32.dll!?
ntdll.dll!?
[Root]

I was not able to find the same stack in a trace from my local dev box, the AXObject is something that gets constructed for accessibility tree in the renderer, this gave a clue as to maybe the problem happens when accessibility is involved. Turning on the screen reader and performing the scroll did create the same stack along with a visible slowdown.

This brings me to my question, is everyone here seeing the issue had screen reader enabled ?

@Minkyu-Choi
Copy link

@deepak1556 Do you mean narrator enabled? Then, narrator is disabled.
Also, I felt better scrolling when I used 1.48.2 version with same windows environment.
Thank you for your work.

@deepak1556
Copy link
Collaborator

Thanks for confirming, one more thing to try, can you launch with code-insiders --disable-features="LayoutNG" and check if the scroll is any better ?

@Minkyu-Choi
Copy link

Unfortunately, scroll behaved same with that option.

@alexdima
Copy link
Member

@deepak1556 I have seen this in the past -- electron/electron#7208 . Electron would enter accessibility mode on laptops with touch screens. IIRC the root problem was that on Windows there was no clear API to find out if a Screen Reader is attached, and the way to determine that was by checking some Windows events if they appeared to be similar to the ones that Screen Readers typically send. I'm not saying this is the same issue, but in that case there was also a lot of slowness experienced. So IMHO I think there are 2 issues here:

  • why is Chromium so slow when it enables accessibility mode -- that should not be the case
  • why is Chromium/Electron enabling accessibility mode -- we might want to look into adding Electron API such that we can disable it entirely and offer a flag or option for people experiencing problems with this to disable it completely. I also remember that Electron had some custom code here on top of Chromium so maybe that one no longer works correctly?

@RLesma
Copy link
Author

RLesma commented Sep 23, 2020

Thanks to the traces from @Minkyu-Choi and @Perh0rd , I was able to see a problematic area during the scroll operation.

Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::HasInheritedPresentationalRole
Code - Insiders.exe!blink::AXNodeObject::InheritsPresentationalRoleFrom
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::BackgroundColor
Code - Insiders.exe!blink::AXLayoutObject::ComputeBackgroundColor
Code - Insiders.exe!blink::AXObject::UpdateCachedAttributeValuesIfNeeded
Code - Insiders.exe!blink::AXObject::AccessibilityIsIgnored
Code - Insiders.exe!blink::AXObjectCacheImpl::FireAXEventImmediately
Code - Insiders.exe!blink::AXNodeObject::ChildrenChanged
Code - Insiders.exe!blink::AXObjectCacheImpl::ChildrenChanged
Code - Insiders.exe!blink::AXObjectCacheImpl::FireTreeUpdatedEventImmediately
Code - Insiders.exe!blink::AXObjectCacheImpl::ProcessUpdates
Code - Insiders.exe!blink::AXObjectCacheImpl::ProcessDeferredAccessibilityEvents
Code - Insiders.exe!blink::LocalFrameView::ForAllNonThrottledLocalFrameViews<`lambda at ../../third_party/blink/renderer/core/frame/local_frame_view.cc:2664:37'>
Code - Insiders.exe!blink::LocalFrameView::RunAccessibilityLifecyclePhase
Code - Insiders.exe!blink::LocalFrameView::UpdateLifecyclePhasesInternal
Code - Insiders.exe!blink::LocalFrameView::UpdateLifecyclePhases
Code - Insiders.exe!blink::PageAnimator::UpdateAllLifecyclePhases
Code - Insiders.exe!blink::WebViewImpl::UpdateLifecycle
Code - Insiders.exe!blink::WidgetBase::UpdateVisualState
Code - Insiders.exe!cc::LayerTreeHost::RequestMainFrameUpdate
Code - Insiders.exe!cc::ProxyMain::BeginMainFrame
Code - Insiders.exe!base::internal::Invoker<base::internal::BindState<void (cc::ProxyMain::*)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState,std::__1::default_delete<cc::BeginMainFrameAndCommitState>>),base::WeakPtr<cc::ProxyMain>,std::__1::unique_ptr<cc::BeginMainFrameAndCommitState,std::__1::default_delete<cc::BeginMainFrameAndCommitState>>>,void ()>::RunOnce
Code - Insiders.exe!base::TaskAnnotator::RunTask
Code - Insiders.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl
Code - Insiders.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork
Code - Insiders.exe!base::MessagePumpDefault::Run
Code - Insiders.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run
Code - Insiders.exe!base::RunLoop::Run
Code - Insiders.exe!content::RendererMain
Code - Insiders.exe!content::ContentMainRunnerImpl::Run
Code - Insiders.exe!service_manager::Main
Code - Insiders.exe!content::ContentMain
Code - Insiders.exe!wWinMain
Code - Insiders.exe!__scrt_common_main_seh
kernel32.dll!?
ntdll.dll!?
[Root]

I was not able to find the same stack in a trace from my local dev box, the AXObject is something that gets constructed for accessibility tree in the renderer, this gave a clue as to maybe the problem happens when accessibility is involved. Turning on the screen reader and performing the scroll did create the same stack along with a visible slowdown.

This brings me to my question, is everyone here seeing the issue had screen reader enabled ?

I do not use the screen reader

@RLesma
Copy link
Author

RLesma commented Sep 23, 2020

image

This shows that the narrator is not enabled, I think

@Perh0rd
Copy link

Perh0rd commented Sep 23, 2020

Just to add, I do not have a touchscreen neither

@deepak1556
Copy link
Collaborator

deepak1556 commented Sep 23, 2020

Thanks @alexdima for the additional context,

I also remember that Electron had some custom code here on top of Chromium so maybe that one no longer works correctly?

https://github.com/electron/electron/blob/master/shell/browser/native_window_views_win.cc#L196-L225

Considering users facing the issue don't have narrator enabled, definitely a bug in either electron/chromium entering accessible mode by default.

why is Chromium so slow when it enables accessibility mode -- that should not be the case

Don't have a definitive answer for this, workaround given by chromium authors to prevent this particular stack was to add a non-transparent background color. We might want to check on this perf issue with newer versions of chromium. I am currently building a exploration release based on Chromium 87.

@deepak1556
Copy link
Collaborator

deepak1556 commented Sep 23, 2020

Here is exploration build based on chromium 87 https://az764295.vo.msecnd.net/exploration/53c0ab95bb770a8f3f869e81bb9da200708e6700/VSCodeUserSetup-x64-1.50.0-exploration.exe , can you check if the slowdown is still visible. Thanks!

One more question to users facing the issue, are you running windows on some VM ?

@deepak1556
Copy link
Collaborator

Apart from testing the exploration builds, can you also check if launching code --disable-renderer-accessibility fixes the issue.

@Minkyu-Choi
Copy link

Minkyu-Choi commented Sep 24, 2020

@deepak1556 code-insider with --disable-rendere-accessibility options shows much better scrolls both keyboard and wheel than before!
Also, exploration build scrolls better than before but not better than disable-renderer-accessibility option.
Finally, I'm not running windows on VM. It seems like disable-renderer-accessibility option is best workaround now.

@pedia
Copy link

pedia commented Jul 12, 2021

Disable "Notebook: Line Number" maybe improve performance of scrolling.

After disable "Line Number":
image

Version: 1.57.1
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:32.912Z (3 wks ago)
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 20.1.0

@Saugatkafley
Copy link

This fixed my issue ,

Ctrl + Shift + P,

Preferences , Reload with extension disabled .
VS was still buggy and slow to use. Then I again reload it fixed the issue

@BlueDev5
Copy link

BlueDev5 commented Oct 7, 2021

This fixed my issue ,

Ctrl + Shift + P,

Preferences , Reload with extension disabled . VS was still buggy and slow to use. Then I again reload it fixed the issue

This also helped me, and vscode didnt lag even after closing the window and re-opening it

@LittleFishLove
Copy link

@jjiburg please open a new issue for macOS, I am tracking this issue specifically for windows.

Could you please paste a link of the macOS solution?

@hsyhsw
Copy link

hsyhsw commented Jan 6, 2022

Sorry. Just posting this here since there seems to be no Mac specific tickets available right now. (all closed without satisfying solution)

Following tickets and comments for the Macs:
#99387 (comment)
#104335 (comment)
seem to be some kind of incompatibility issue with Electron + certain profile type, not the color profile itself. I had the same issue for my old(mid 2012) MBP, thinking that it's time to dump this old, slow machine.

Today the issue has completely gone not completely, but vscode now runs considerably faster after applying a new color profile of type 'single curve + matrix', not 'xyz lut + matrix'. (yay! my mac is live again!)
Actually got a hint from displaycal warning saying native MacOS does not support profiles other than single curve + matrix. I think it's worth trying creating a new profile of a proper type if you are using one made some time ago.

@mbevilacqua
Copy link

--disable-renderer-accessibility did not work
--disable-gpu solved my problem

Version: 1.68.1 (system setup)
Commit: 30d9c6c
Date: 2022-06-14T12:48:58.283Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.19043

Running on fusion.

@mjspeck
Copy link

mjspeck commented Jul 11, 2022

I'm currently having this problem with a roughly 28-page markdown file.

Version:

❯ code-insiders --version
1.70.0-insider
3104db414c8fedcf6e4493f14da7df0b7413853a
x64

@Befzz
Copy link

Befzz commented Jul 23, 2022

i'am able to pinpoint issue for my PC (win10 19043 x64 / NVIDIA 1060)
code 1.69.2

issue: scrolling seems like lagging behind, app behave not responsive
--disable-gpu-compositing works, but is not an option

tl;dr Fix:
I've created nvidia profile for code.exe and have set only one setting ( 0x10B135FE ) to 0x00000000. Issues is gone.


In NVIDIA Control Panel i have an option for Global profile set:
Background Application Max Framerate : 20

It works well for games(when ALT+TAB), and doesn't affect Web Browsers (Chrome / Yandex ).
But it affects VSCode!

If i remove framerate limit, the issue is gone.

What makes Web Browsers special is NVIDIA Profiles.
Particulary one setting:

image

0x10B135FE is set to 0x00000000

If i remove or change it, then Web Browsers(tested on Yandex) starts to be much less responsive(like a vscode).
This setting seems like makes an app to ignore Background Application Max Framerate

maybe related: #147253

side note:
i think VSCode must have its own profile, just because if User will set FXAA globally On, then you will see blurry text in VSCode but not in web browsers, since they have this(users are not able to change it in control panel):
image

other interesting settings:
image
image

@YinanZhaoXometry
Copy link

image

this fix my input lagging issue, only in markdown files

@rynoV
Copy link

rynoV commented Aug 17, 2023

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

@LucaMarconato
Copy link

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

@kurtextrem
Copy link

kurtextrem commented Jan 6, 2024

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

@notmalicik
Copy link

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

@rynoV
Copy link

rynoV commented Feb 7, 2024

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

@tadghh
Copy link

tadghh commented Feb 12, 2024

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

@iacullo-atri
Copy link

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

@JHartzer
Copy link

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

@nathanredblur
Copy link

nathanredblur commented Aug 2, 2024

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

@tadghh
Copy link

tadghh commented Aug 2, 2024

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.

@MarFre22
Copy link

Thanks for all your tips!
Although I use VSCodium on Mac, I followed the ones recommended by @iacullo-atri @tadghh @JHartzer @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug mitigated Issue has workaround in place perf windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests