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

Extension gets very slow after a few hours of use #15670

Closed
trouve-antoine opened this issue May 7, 2024 · 6 comments
Closed

Extension gets very slow after a few hours of use #15670

trouve-antoine opened this issue May 7, 2024 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) perf Performance issues

Comments

@trouve-antoine
Copy link

Type: Bug

Since about two weeks the Jupyter extension often shows as unresponsive in the list of Running Extension. After launch, it starts to get slower after a few hours, to a point where running a cell with only 1+1 may take minutes.
The same notebooks work perfectly fine when I run Jupyter standalone and use in my browser.

Extension version: 2024.4.0
VS Code version: Code 1.89.0 (Universal) (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:10:10.196Z)
OS version: Darwin arm64 23.4.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 24)
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
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 3, 4
Memory (System) 16.00GB (1.61GB free)
Process Argv hafh-analytics --crash-reporter-id a522f206-f325-475e-92e4-aaa55a98363f
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
945dj816:31013170
pythoncenvpt:31022790
dwnewjupytercf:31035177

@trouve-antoine trouve-antoine changed the title Extension gets very slow Extension gets very slow after a few hours of use May 7, 2024
@DonJayamanne
Copy link
Contributor

Please could you enable logging as follows:

  • Open settings & go into Jupyter->Logging
  • Change the value to verbose
  • Reload VS Code,
  • Attempt to repro the issue & then copy the output from the Jupyter output panel.

@JasonGross
Copy link

JasonGross commented May 18, 2024

Not sure if I'm having the same problem or a different one, but for me the log seems to indicate that it's the kernel (the node process running the vscode server on the remote machine) that is taking all the time:

02:46:47.500 [info] Generated code for 35 = <ipython-input-35-2073cdd569a5> with 273 lines
02:46:48.250 [debug] Cell Index:3 sent to kernel
02:46:49.050 [debug] Start cell 3 execution @ 1716000409049 (clear output)
02:46:49.050 [debug] Kernel acknowledged execution of cell 3 @ 1716000409049

(here there is only about a second of lag, I'll post again when it gets back up to many seconds)

How do I debug this sort of performance issue?

@JasonGross
Copy link

JasonGross commented May 18, 2024

This one is somewhat longer:

02:52:44.007 [info] Handle Execution of Cells 0 for /Interactive-1.interactive
02:52:44.008 [debug] Cell Index:0 sent to kernel
02:52:46.567 [debug] Interpreter for Pylance for Notebook URI "/Interactive-1.interactive" is ~/guarantees-based-mechanistic-interpretability/.venv/bin/python
02:52:47.776 [debug] Start cell 0 execution @ 1716000767776 (clear output)
02:52:47.776 [debug] Kernel acknowledged execution of cell 0 @ 1716000767776

Edit: And here's a long one without pylance in the middle:

02:54:05.571 [info] Handle Execution of Cells 1 for /Interactive-1.interactive
02:54:05.574 [debug] Cell Index:1 sent to kernel
02:54:09.204 [debug] Start cell 1 execution @ 1716000849204 (clear output)
02:54:09.204 [debug] Kernel acknowledged execution of cell 1 @ 1716000849204

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) perf Performance issues labels May 20, 2024
@DonJayamanne
Copy link
Contributor

@JasonGross
Are you implying that the kernel gets slow after some time?
If this is the case, I'm not sure there's anything we can do about that.
However if you believe VS Code is contributing to this, please can you disable all extensions, including Pylance,
leave the following enabled and test

  • Jupyter, Python and Notebook Renderers
    Try disabling the following setting to see if that makes a difference.

Image

@SterlingYM
Copy link

Can this be related to microsoft/vscode#211154 (which branched off from #14459)?

@DonJayamanne
Copy link
Contributor

Its been over a month since the information was requested, hence closing this issue

If however anyone is still running into similar issues, please feel free to create a new issue instead fo commenting here, that way we start fresh.

@microsoft microsoft locked as resolved and limited conversation to collaborators Jul 22, 2024
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 notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) perf Performance issues
Projects
None yet
Development

No branches or pull requests

4 participants