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

Test Run completion takes very long on many tests (after RunHandler is completed) #238241

Open
Danielku15 opened this issue Jan 19, 2025 · 2 comments
Assignees

Comments

@Danielku15
Copy link

Type: Performance Issue

Description
I am the author of mocha-vscode and noticed quite significant performance issue when executing a huge number of tests. First I suspected a problem in my extension but realized that my code had already completed and vscode was still performing updates in the UI.

I am executing ~5k tests and Mocha completes within 1-2secs and within my extension the whole RunHandler is completed. But VSCode still takes a significant amount of time to update all status information for the tests and show the log outputs of the extension.

Here a video showing the UI stall and long test execution (despite the RunHandler completed)

vscode-slow.mp4

It look to the user as if the test execution is ongoing and users get this experience:

  • They might think the test execution is to blame and attempt cancelling it. But cancelling does nothing in this case.
  • The UI is still partly responsive so they might want to check logs which are also frozen.
  • They still get test updates, just very slow and they have to wait quite some time for it to finish.

All the calls made to the TestRun to update status information are internally queued and then executed on the UI thread causing delays. If there is anything I could do from my extension I'm happy to change.

**Steps to reproduce: **
Follow the readme in https://github.com/Danielku15/vscode-test-explorer-performance

VS Code version: Code 1.96.3 (91fbddd, 2025-01-09T18:14:09.060Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.92GB (40.60GB free)
Process Argv --crash-reporter-id 4382a838-d161-4bfb-8e70-abd05b5ada08
Screen Reader no
VM 0%
Extensions (22)
Extension Author (truncated) Version
ng-template Ang 19.0.4
vscode-eslint dba 3.0.10
vscode-ast ddo 0.0.3
vscode-html-css ecm 2.0.12
prettier-vscode esb 11.0.0
vscode-github-actions git 0.27.0
vscode-peacock joh 4.2.2
csharp ms- 2.61.28
vscode-dotnet-runtime ms- 2.2.5
remote-containers ms- 0.394.0
remote-wsl ms- 0.88.5
cmake-tools ms- 1.19.52
cpptools ms- 1.22.11
cpptools-extension-pack ms- 1.3.0
extension-test-runner ms- 0.0.12
hexeditor ms- 1.11.1
test-adapter-converter ms- 0.2.1
vetur oct 0.37.3
markdown-preview-enhanced shd 0.8.15
cmake twx 0.0.17
vscode-mdx uni 1.8.13
vscode-mdx-preview xyc 0.3.3

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputs:31217127

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.96.4. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@Danielku15
Copy link
Author

The problem also exists in the latest version.

Version: 1.96.4 (user setup)
Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
Date: 2025-01-16T00:16:19.038Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants