Slow reponse to scroll and typing
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 (58bb7b2331731bf72587010e943852e13e6fd3cf, 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 |
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
- Settings page mouse wheel scrolling is too slow (#104682)
- Mouse Wheel Scrolling Ignores Mouse Control Panel Settings (#7640)
- Mouse wheel first scroll is ignored in VSCode editor (#106002)
- Scroll with mouse wheel in Explorer tab while dragging file (#104884)
- Scrolling in a browser affects scrolling in VS Code Studio (#95857)
@RLesma Does this reproduce when disabling all extensions? Press F1 and then choose Developer: Reload Window with Extensions Disabled

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: e790b931385d72cf5669fcefc51cdf65990efa5d 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!
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.
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 Does this reproduce when disabling all extensions? Press
F1and then chooseDeveloper: Reload Window with Extensions Disabled
I just did that, and it is still slow. Definitely not an extension issue.
Downgrading to 1.48.2 also solved the issue for me.
@deepak1556 Would you need more info here ? (this seems similar to #106456 , #106939 which are all on Windows)
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 ?
@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.
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 ?
Unfortunately, scroll behaved same with that option.
@deepak1556 I have seen this in the past -- https://github.com/electron/electron/issues/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?
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

This shows that the narrator is not enabled, I think
Just to add, I do not have a touchscreen neither
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.
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 ?
Apart from testing the exploration builds, can you also check if launching code --disable-renderer-accessibility fixes the issue.
@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.
Perfect, thanks. Couple more testing to narrow down the issue,
- Download and extract https://github.com/electron/electron/releases/download/v9.3.0/electron-v9.3.0-win32-x64.zip
- Run
electron.exe -iwhich will create a interactive session - Execute the following
> const { app } = require('electron')
> app.isAccessibilitySupportEnabled()
- Paste the output here
electron.exe -i gives 'Electron REPL not currently supported on Windows' and I couldn't get interactive session. How can I deal with this?
Oops, sorry didn't notice it. Try this instead, add the following contents to some test.js file
const {app, BrowserWindow } = require('electron')
app.on('accessibility-support-changed', (ev, accessibilitySupportEnabled) => {
console.log(`Accesibility support changed : ${accessibilitySupportEnabled}`)
})
function createWindow () {
const mainWindow = new BrowserWindow({
width: 800,
height: 600
})
mainWindow.webContents.on('did-finish-load', () => {
console.log(`Accessibility support onLoad : ${app.isAccessibilitySupportEnabled()}`)
})
mainWindow.loadURL('https://vscode-web-test-playground.azurewebsites.net/?enter=true')
}
app.on('ready', createWindow)
app.on('window-all-closed', function () {
app.quit()
})
then
electron.exe <path>/test.js --enable-logging
open some files, do some scroll and attach the terminal log.
I've seen slow scroll performance.
Here's terminal log
Accessibility support onLoad : false
[27748:0924/132800.617:INFO:CONSOLE(14)] "(electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.", source: electron/js2c/renderer_init.js (14)
[27748:0924/132800.617:INFO:CONSOLE(134)] "%cElectron Security Warning (enableRemoteModule) font-weight: bold; This renderer process has "enableRemoteModule" enabled
and attempted to load remote content from 'https://vscode-web-test-playground.azurewebsites.net/?enter=true'. This
exposes users of this app to unnecessary security risks.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.", source: electron/js2c/renderer_init.js (134)
[27748:0924/132800.618:INFO:CONSOLE(134)] "%cElectron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security
Policy set or a policy with "unsafe-eval" enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.", source: electron/js2c/renderer_init.js (134)
[27748:0924/132800.677:INFO:CONSOLE(1656)] "%c WARN color: #993 Ignoring the error while validating workspace folder memfs:/sample-folder - No file system provider found for resource 'memfs:/sample-folder'", source: https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js (1656)
[27748:0924/132800.784:INFO:CONSOLE(3049)] "Unable to instantiate workbench contribution oe. TypeError: Cannot read property 'options' of undefined", source: https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js (3049)
[27748:0924/132800.785:INFO:CONSOLE(3049)] "Unable to instantiate workbench contribution p. TypeError: Cannot read property 'options' of undefined", source: https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js (3049)
[27748:0924/132800.856:INFO:CONSOLE(1656)] "%c ERR color: #f33 Cannot read property 'options' of undefined: TypeError: Cannot read property 'options' of undefined
at n.isEnabled (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:5953:614)
at new _ (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:2896:792)
at new n (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:5953:398)
at d._createInstance (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:1640:446)
at https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:1642:233
at t.IdleValue._executor (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:136:349)
at t.IdleValue.get value [as value] (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:136:542)
at Object.get (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:1642:334)
at new e (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:5996:748)
at d._createInstance (https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js:1640:446)", source: https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js (1656)
[27748:0924/132826.216:INFO:CONSOLE(1656)] "%c INFO color: #33f [lifecycle] onBeforeUnload triggered", source: https://vscode-web-test-playground.azurewebsites.net/static-insider-f943318042a3b9229049aea86cea04d0ff9c8210/out/vs/workbench/workbench.web.api.js (1656)
If you have visual studio x64 Native Tools Command Prompt , can you run the following
// cl.exe source.cpp -o screen_reader_checker.exe /EHsc
#include <windows.h>
#include <uiautomation.h>
#include <iostream>
#pragma comment(lib,"user32.lib")
#pragma comment(lib,"Uiautomationcore.lib")
int main()
{
UINT screenReader = 0;
SystemParametersInfo(SPI_GETSCREENREADER, 0, &screenReader, 0);
std::cerr << screenReader && UiaClientsAreListening();
}
If not, I can provide the compiled version, main idea is to confirm if electron is entering accessible mode by default on your system.
I don't have. Can you provide compiled version?
Output is number zero like following
PS C:\> .\screen_reader_checker.exe
0
hmm, that definitely doesn't align with other findings so far. Let me tweak the electron example a bit.
- Download and extract https://gist.github.com/deepak1556/c7464adb3e9800cad04102ec07859900
electron.exe <path-to-extracted-folder>- Perform scroll and once you see the slowdown, open devtools (view menu -> Toggle Developer Tools)
- Run
window.isAccessible()
Thanks for all the testing so far, it has been really helpful. Would be great if you can run this test too.
You already solved my issue with great workaround. I'll trying to help you whenever I can. Anyway I think so. It's very weird. However, window.isAccessible() outputs false like following.
