microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.28k stars 290 forks source link

Tunneled notebooks on VScode significantly slower than browser #13257

Closed jerrylin96 closed 1 year ago

jerrylin96 commented 1 year ago

Type: Bug

Executing cells in a tunneled jupyter notebook on VScode is at least one order of magnitude slower than on browser, and I have no idea why. Is it just because of the overhead or is there a bug? I was initially quite happy with the experience, but this is a real problem.

For example executing an empty code cell or a code cell that just displays the content of a variable takes 30 seconds, which is mind bogglingly slow. Is there something wrong here?

I've also noticed that some conda environments do not play nice with tunneled notebooks on VScode despite being perfectly fine on browser. I'm not sure if this is the issue here.

VS Code version: Code 1.76.2 (Universal) (ee2b180d582a7f601fa6ecfdad8d9fd269ab1884, 2023-03-14T17:54:09.061Z) OS version: Darwin arm64 22.3.0 Modes: Sandboxed: No Remote OS version: Linux x64 4.18.0-193.28.1.el8_2.x86_64

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|3, 3, 3| |Memory (System)|16.00GB (0.24GB free)| |Process Argv|--crash-reporter-id e2493ef2-63f6-4853-8d76-bd91aaff010d| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|SSH: bridges2.psc.edu| |OS|Linux x64 4.18.0-193.28.1.el8_2.x86_64| |CPUs|AMD EPYC 7742 64-Core Processor (256 x 3267)| |Memory (System)|251.09GB (71.33GB free)| |VM|0%|
Extensions (31) Extension|Author (truncated)|Version ---|---|--- remotehub|Git|0.52.0 jupyter-keymap|ms-|1.1.0 remote-containers|ms-|0.282.0 remote-ssh|ms-|0.98.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.76.1 vscode-remote-extensionpack|ms-|0.24.0 azure-repos|ms-|0.28.0 remote-explorer|ms-|0.3.2023032309 remote-repositories|ms-|0.30.0 remote-server|ms-|1.0.0 linter-gfortran|for|3.2.0 copilot|Git|1.78.9758 vscode-docker|ms-|1.24.0 vscode-kubernetes-tools|ms-|1.3.11 isort|ms-|2022.8.0 python|ms-|2023.4.1 vscode-pylance|ms-|2023.3.30 jupyter|ms-|2023.2.1200692131 jupyter-keymap|ms-|1.1.0 jupyter-renderers|ms-|1.0.15 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-powertoys|ms-|0.0.6 vscode-jupyter-slideshow|ms-|0.1.5 cmake-tools|ms-|1.13.45 cpptools|ms-|1.14.5 cpptools-extension-pack|ms-|1.3.0 powershell|ms-|2023.2.1 vscode-yaml|red|1.12.2 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 (4 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30610679 nodejswelcome1cf:30587006 3biah626:30602489 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 a9j8j154:30646983 showlangstatbar:30672706 vsccsb:30677849 pythonb192cf:30669361 azdwalk:30687957 pythonms35cf:30686773 ```
rebornix commented 1 year ago

Executing cells in a tunneled jupyter notebook

@jerrylin96 do you mean running Jupyter server in a different machine and connect to it through VS Code desktop app or are you using Remote SSH?

jerrylin96 commented 1 year ago

I generally connect with the following command:

jupyter lab --port="$1" --no-browser --NotebookApp.allow_origin='*' --ip=0.0.0.0

where "$1" corresponds to the port number. I was able to mostly resolve this issue by deleting unnecessary extensions, including ones that were just themes. I am not sure if this answers your question.

However, after the latest update, I am now running into an issue where I cannot even connect to the remote server in the first place:

Screenshot 2023-03-31 at 12 46 35 PM

This is the kind of message I run into now. This happens every time now, and I have to use the standard jupyter notebooks in browser to get around this. I'm not sure what changed to cause this.

DonJayamanne commented 1 year ago

@jerrylin96 I believe this issue has been addressed, if i'm not mistaken I've seen at other similar issue(s) you have run into with the same error message URL already exsts, Closing this as resolved, if this still exists, please feel free to re-open this issue, or ping us and we'll re-open this or please feel free to create a new issue and we'll look into it.