vscode-jupyter icon indicating copy to clipboard operation
vscode-jupyter copied to clipboard

Slow performance of Jupyter Extension Version: 1.88.0

Open levietha92 opened this issue 1 year ago • 6 comments

Applies To

  • [ ] Notebooks (.ipynb files)
  • [X] Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

image

  • Slow intake in Interactive window when I highlight & run a code
  • Slow output in Interactive window
  • After a while of this it will disconnect Kernel image Version: 1.88.0 Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c Date: 2024-04-03T13:28:09.495Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Darwin arm64 23.0.0

VS Code Version

1.88.0

Jupyter Extension Version

2024.3.0

Jupyter logs

Visual Studio Code (1.88.0, undefined, desktop)
Jupyter Extension Version: 2024.3.0.
Python Extension Version: 2024.4.0.
Pylance Extension Version: 2024.4.1.
Platform: darwin (arm64).
Workspace folder ~/GitHub/looker-sense, Home = /Users/hanna
11:42:42.250 [error] Failed to get activated conda env vars for /opt/anaconda3/envs/testenv/bin/python
                 in 423ms
11:42:42.251 [error] Unable to determine site packages path for python /opt/anaconda3/envs/testenv/bin/python (Conda)
11:42:42.256 [info] Process Execution: /opt/anaconda3/envs/testenv/bin/python -m pip list
11:45:53.184 [info] Handle Execution of Cells 21 for /Interactive-1.interactive
11:45:53.189 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0bc109d4e120f8e7603796211b6677ae82da12e688d8fcf28cc2e4e4249ba6ee3./opt/anaconda3/envs/testenv/python./opt/anaconda3/envs/testenv/python.-m#ipykernel_launcher  (Python Path: /opt/anaconda3/envs/testenv/bin/python, Conda, testenv (Python 3.9.0), 3.9.0) for '/Interactive-1.interactive' (disableUI=false)
11:45:53.219 [error] Failed to get activated conda env vars for /opt/anaconda3/envs/testenv/bin/python
                 in 21ms
11:45:53.220 [error] Unable to determine site packages path for python /opt/anaconda3/envs/testenv/bin/python (Conda)
11:45:53.222 [info] Process Execution: /opt/anaconda3/envs/testenv/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
11:45:53.228 [info] Process Execution: /opt/anaconda3/envs/testenv/bin/python -m ipykernel_launcher --f=~/Library/Jupyter/runtime/kernel-v2-118507mCdMkROgg4K.json
    > cwd: ~/GitHub/looker-sense
11:45:54.135 [info] Process Execution: /opt/anaconda3/envs/testenv/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2024.3.0-darwin-arm64/pythonFiles/printJupyterDataDir.py
11:45:54.158 [warn] Cell completed with errors [gd [Error]: invalid syntax (<ipython-input-1-69b6f301c5e3>, line 1)
	at r.execute (~/.vscode/extensions/ms-toolsai.jupyter-2024.3.0-darwin-arm64/dist/extension.node.js:327:4943)] {
  ename: 'SyntaxError',
  evalue: 'invalid syntax (<ipython-input-1-69b6f301c5e3>, line 1)',
  traceback: [
    '\x1B[0;36m  Cell \x1B[0;32mIn[1], line 1\x1B[0;36m\x1B[0m\n' +
      '\x1B[0;31m    Jupyter Show Output\x1B[0m\n' +
      '\x1B[0m            ^\x1B[0m\n' +
      '\x1B[0;31mSyntaxError\x1B[0m\x1B[0;31m:\x1B[0m invalid syntax\n'
  ]
}
11:45:54.158 [info] Cell 21 completed in 0.01s (start: 1712637954148, end: 1712637954158)
11:45:54.289 [warn] Got a non-existent Jupyter Data Dir file://~/.local/share/jupyter

Coding Language and Runtime Version

Python v 3.9.0

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

conda 4.11.0

Running Jupyter locally or remotely?

Local

levietha92 avatar Apr 09 '24 04:04 levietha92

11:42:42.250 [error] Failed to get activated conda env vars for /opt/anaconda3/envs/testenv/bin/python in 423ms

Sorry you are running into this issue and thank you for filling this.

Look like there's a problem activating the conda env. Please can you try installing the previous version of python extension. Try 2024.2 and see if that makes a difference.

DonJayamanne avatar Apr 09 '24 10:04 DonJayamanne

I'm having slowness in general when using vscode-remote. I had downgraded to 1.87.2 and it was much better. Sorry, it's so frustrating to work with Vscode sometimes...

alanwilter avatar Apr 10 '24 11:04 alanwilter

We are currently working on some notebook performance related fixes in vscode. We have also identified some issues with the activation of conda envs and hopefully the fix will be shipped tomorrow (new version of jupyter and python extensions)

I'm sorry you are existing these issues and thank you for your patience.

DonJayamanne avatar Apr 10 '24 13:04 DonJayamanne

Hello everyone :) For me, working in .ipynb files has recently become extremely slow. Could this also be related to this issue?

Typing text in cells, markdown or code, has a little bit of latency on startup already and it gets worse over time, it takes like 10 seconds at the moment.

any hints on how to fix this yet?

Thanks for your work and best regards! .martin

martinscripts avatar Apr 12 '24 13:04 martinscripts

Typing text in cells, markdown or code, has a little bit of latency on startup already and it gets worse

@martinscripts Can you try with a notebook without any markdown cells, and just a couple of code cells. Does that make a difference? Please can you share the notebook you are currently using?

DonJayamanne avatar Apr 12 '24 14:04 DonJayamanne

unfortunately I can't share the notebook I am using because of sensible data. I tried to recreate it with just a part of it that I could share, but couldnt reproduce the problem.

But: If I delete all markdown cells, then it runs smoothly again.

I also use pasted images in my markdown cells. As well as some quarto yaml header in the very first cell, in case that matters.

martinscripts avatar Apr 12 '24 15:04 martinscripts

Hey @DonJayamanne, this issue might need further attention.

@levietha92, you can help us out by closing this issue if the problem no longer exists, or adding more information.

vscodenpa avatar Jul 02 '24 13:07 vscodenpa

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

vscodenpa avatar Jul 09 '24 13:07 vscodenpa