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

Jupyter in vscode run very slow in Macbook air m1 #11568

Closed
wybert opened this issue Oct 7, 2022 · 10 comments
Closed

Jupyter in vscode run very slow in Macbook air m1 #11568

wybert opened this issue Oct 7, 2022 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster perf Performance issues

Comments

@wybert
Copy link

wybert commented Oct 7, 2022

Environment data

  • VS Code version: 1.72.0 64bbfbf67ada9953918d72e1df2f4d8e537d340e arm64
  • Jupyter Extension version : v2022.9.1002791758
  • Python Extension version (available under the Extensions sidebar): v2022.16.0
  • OS (Windows | Mac | Linux distro) and version: macOS 12.6 21G115 arm64
  • Python and/or Anaconda version: conda 4.12.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Local

Expected behaviour

Run quickly in seconds

Actual behaviour

Run very slow

Steps to reproduce:

I don't know how to reproduce, it is not always slow but sometimes very slow. When I switch back to Jupyter-lab, it will be very fast. In windows, it never happens:)

I know there are some same open issues like 7069, but they are all closed. Also, when I use Vscode Jupyter by remote ssh (with some Linux servers) through vs code. This also never happened.

@wybert wybert added the bug Issue identified by VS Code Team member as probable bug label Oct 7, 2022
@wybert wybert changed the title Jupyter in vscode run very slow Jupyter in vscode run very slow in Macbook air m1 Oct 7, 2022
@amunger
Copy link
Contributor

amunger commented Oct 7, 2022

Is it running a cell that takes a long time or opening/editing the notebook?
Does it occur often enough that you could capture logs for us? If you can, set the Jupyter: Logging Level to verbose and copy the content of the output window: Jupyter: Show Output when this happens again.

@amunger amunger added perf Performance issues info-needed Issue requires more information from poster labels Oct 7, 2022
@wybert
Copy link
Author

wybert commented Oct 7, 2022

Is it running a cell that takes a long time or opening/editing the notebook? Does it occur often enough that you could capture logs for us? If you can, set the Jupyter: Logging Level to verbose and copy the content of the output window: Jupyter: Show Output when this happens again.

It's running a cell that takes a long time. I will continue to track this problem and get feedback here.

@amunger amunger assigned DonJayamanne and unassigned amunger Oct 7, 2022
@wybert
Copy link
Author

wybert commented Oct 7, 2022

I just caught this bug again.

image

debug 18:32:13.497: Jupyter completion time: 2
debug 18:32:13.505: Jupyter completion time: 8
debug 18:32:13.510: Jupyter completion time: 6
debug 18:32:17.567: Jupyter completion time: 28
debug 18:32:17.587: VSCodeNotebookController::handleExecution, Class name = j (started execution)
debug 18:32:17.589: Execute Cell 9 /Users/kang/baiduyun_sync/91160_data_explore/notebooks/3.3-xiaokang-make-plots.ipynb
debug 18:32:17.589: start the kernel, options.disableUI=false
debug 18:32:17.590: Start Jupyter Session in kernel.ts with disableUI = false
debug 18:32:23.946: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.441 NotebookApp] 404 GET /json/list (127.0.0.1) 2.010000ms referer=None

[W 18:32:21.441 NotebookApp] 404 GET /json/list (127.0.0.1) 2.010000ms referer=None
debug 18:32:26.429: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.496 NotebookApp] 404 GET /json/list (127.0.0.1) 0.660000ms referer=None

[W 18:32:21.496 NotebookApp] 404 GET /json/list (127.0.0.1) 0.660000ms referer=None
debug 18:32:26.429: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.549 NotebookApp] 404 GET /json/list (127.0.0.1) 0.670000ms referer=None

[W 18:32:21.549 NotebookApp] 404 GET /json/list (127.0.0.1) 0.670000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.603 NotebookApp] 404 GET /json/list (127.0.0.1) 0.660000ms referer=None

[W 18:32:21.603 NotebookApp] 404 GET /json/list (127.0.0.1) 0.660000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.660 NotebookApp] 404 GET /json/list (127.0.0.1) 0.720000ms referer=None

[W 18:32:21.660 NotebookApp] 404 GET /json/list (127.0.0.1) 0.720000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.718 NotebookApp] 404 GET /json/list (127.0.0.1) 0.670000ms referer=None

[W 18:32:21.718 NotebookApp] 404 GET /json/list (127.0.0.1) 0.670000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.776 NotebookApp] 404 GET /json/list (127.0.0.1) 0.690000ms referer=None

[W 18:32:21.776 NotebookApp] 404 GET /json/list (127.0.0.1) 0.690000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.835 NotebookApp] 404 GET /json/list (127.0.0.1) 0.630000ms referer=None

[W 18:32:21.835 NotebookApp] 404 GET /json/list (127.0.0.1) 0.630000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.893 NotebookApp] 404 GET /json/list (127.0.0.1) 1.130000ms referer=None

[W 18:32:21.893 NotebookApp] 404 GET /json/list (127.0.0.1) 1.130000ms referer=None
debug 18:32:26.430: Python Daemon (pid: 34479): write to stderr: [W 18:32:21.951 NotebookApp] 404 GET /json/list (127.0.0.1) 0.680000ms referer=None

[W 18:32:21.951 NotebookApp] 404 GET /json/list (127.0.0.1) 0.680000ms referer=None
debug 18:32:26.787: Cell 9 executed with state Success
debug 18:32:26.787: VSCodeNotebookController::handleExecution, Class name = j, completed in 9200ms, has a falsy return value

@DonJayamanne
Copy link
Contributor

  • Are you connecting to a remote jupyter kernel? I think you are
  • Is your workflow as follows:
    • Open a notebook,
    • Select a remote kernel
    • Run cell
    • And you notice a delay.
      If this is the case, then the delay is expected for the first time as we need to first connect to the remote kernel.
      Jupyter is fast as the application is already launched, where as in VS Code, we first need to connect to the jupyter server and then connect to the remote kernel.

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.

@wybert
Copy link
Author

wybert commented Oct 10, 2022

Actually, my workflow is as follows,

  1. open my work path with code
  2. open the Jupyter notebook from VS code's sidebar/the explore
  3. change the kernel to another kernel
  4. work on the notebook and all is good until the bug happens.

I already changed the setting to verbose

image

and the above is the output from Jupyter output panel. Have I missed something?

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 10, 2022

Please could you upload all of the logs, you don't seem to have uploaded everything.

change the kernel to another kernel

Also, are you connecting to a remote kernel or local kernel?

@wybert
Copy link
Author

wybert commented Oct 24, 2022

Local kernel.
When I try to investigate a data frame, It takes seconds.
image

The whole output is too long to put paste here. I put it in a text file below.
Visual Studio Code -Jupyter- Output.txt

@wybert
Copy link
Author

wybert commented Nov 14, 2022

Feedback about this issue. After disabling all my extensions except the python extension, it seems that the problem has gone. I want to keep this issue open for a while (maybe one more month) to see if I still got the same problem. I will get my feedback then.

@DonJayamanne
Copy link
Contributor

Its been over 3 weeks, lets close this for now.
@wybert If you run into this again, please feel free to ping here and I'll reopen this issue or please feel free to create a new issue and I'll look into thath

@wybert
Copy link
Author

wybert commented Dec 16, 2022

After I disabled all the extensions except the Python extension, it seemed to work well. Cheers!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster perf Performance issues
Projects
None yet
Development

No branches or pull requests

3 participants