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

I and everyone I know don't use vscode-jupyter because it's slow #13338

Closed
loftusa opened this issue Apr 17, 2023 · 9 comments
Closed

I and everyone I know don't use vscode-jupyter because it's slow #13338

loftusa opened this issue Apr 17, 2023 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-remote Applies to remote Jupyter Servers perf Performance issues

Comments

@loftusa
Copy link

loftusa commented Apr 17, 2023

I'm a data scientist and I am friends with a lot of other data scientists. We talk about different frameworks a lot.

Everybody I know still uses jupyter lab directly, despite the fact that things like copilot and all the nice vscode extensions and themes and having an integrated environment should be pushing everyone to use vscode-jupyter instead.

Some people I know use Python Interactive with the #%% setup instead. Everyone I know has tried out using vscode-jupyter, and then switched back to normal jupyter lab after a bit.

There are two big reasons for this, one hard to fix, the other incredibly easy:

a) It is simply slower than jupyter lab. Cells just take longer to run. I'm not entirely sure why because I don't know the internals of vscode-jupyter. But jupyter lab just feels smoother.

b) documentation is more annoying to access because if you press shift-tab inside of a call (e.g., x = foo(param1, <shift-tab>), it won't pull immediately up the full documentation for the function like in jupyter lab. And you can't press it twice. Or, sometimes it does, but it's way too slow to appear, and so it's better to just look up the documentation manually. Because doing this is such a regular part of everybody's workflow, the lack of it is annoying enough to not switch from jupyter lab. All you have to do here is exactly copy jupyter lab's functionality. Inline documentation is the most important thing for the majority of people writing code, and if it's not done right, nothing else matters.

I am writing this because I've wanted to switch entirely to vscode-jupyter for years, because I like copilot and because it would be nice to do everything in one IDE - but I've been blocked for years, and everyone else I know has also been blocked for years. If you guys don't prioritize on these two things, people will simply not switch. Building new features or fixing other minor issues will not do anything because these blocking issues have not been fixed.

Posting out of frustration and the hope that the core developers will see this and realize that these are the only real issues holding what could be a great piece of software back. Please, please, please for the love of god prioritize these.

@loftusa loftusa added the feature-request Request for new features or functionality label Apr 17, 2023
@amunger
Copy link
Contributor

amunger commented Apr 17, 2023

Thanks for the feedback!

We have experimented a bit with the second suggestion in the jupyter powertoys extension with the jupyterContextualHelp.focus command, although that shows in a separate window rather than a tooltip pop-up. It looks like you actually commented on the related issue last year. Have you tried that feature out?

The language server also provides the Trigger Parameter Hints command, which might be what you're looking for - ctrl+shift+space by default.
image

I can see what you mean about jupyter lab feeling smoother. It seems like it may mostly be the additional UI updates we make like execution time and the status indicator since we have to communicate across processes for that.

@amunger
Copy link
Contributor

amunger commented Apr 18, 2023

I should actually confirm the specific performance differences that you're seeing to make sure we're looking at the right area - Would you be able to post a gif that demonstrates the slowness?

@amunger amunger added the info-needed Issue requires more information from poster label Apr 18, 2023
@SlimakSlimak
Copy link

SlimakSlimak commented May 1, 2023

Hi,
I experience the slowness as well, please see the attached gifs - sometimes it may take up to few seconds to even start execution of the cell.
vscodejupyter2
vscodejupyter

I also consider stopping using it because of that, even though I would love to use it, because of copilot and other reasons mentioned by @loftusa

@marctorsoc
Copy link

I do use vscode for notebooks, but certainly I'm missing features I had in Jupyterlab:

  • jupytext integration is not well resolved. We only push to GH the .py generated from the notebook. In jupyterlab it's sync'd and saving in the notebook updates the .py. Save on reverse, but the sync is done when opening the notebook. In VScode, among other issues, you can open a py as a notebook, but when you close it you lose all your outputs 😱
  • Slowness that people talk about. When working with a notebook on EC2, the suggestions from VScode (e.g. autocomplete) come much later than those from Copilot. Plus, often it takes 1-2 seconds to start execution of a cell.
  • Searching in a long notebook it's slow and sometimes does not even work.
  • I had instances of writing a markdown, pressing execute (which does not execute anything, just gets you out of editing) and then the cells looks empty, taking the same space but just a big box empty. If I edit again I see my original text, but this is defo a bug. Not a big deal though.
  • Execution time: I was using https://github.com/deshaw/jupyterlab-execute-time, to get good info about the time spent to run a cell and when was the last time. There's something similar but worse (unless I'm unaware of some extension)
    • First, it just shows the time, not the last time when was executed. For that you need to hover the mouse
    • Second, when I open the notebook on the remote the next day, all such information has disappeared. I imagine the info gets erased once reloading the window. In the aforementioned extension, such info is persisted in the metadata of the notebook, so stays with you forever.
    • Because the info stays with the json of the notebook, (this is a very niche case), I could generate a html report from the notebook and persist the execution time info into the html. This is something I cannot do in VScode notebooks.

All of this being said, I use vscode-jupyter because it provides me more pros than cons

@amunger
Copy link
Contributor

amunger commented Jul 21, 2023

In jupyterlab it's sync'd and saving in the notebook updates the .py. Save on reverse, but the sync is done when opening the notebook.

sounds similar to #1240

When working with a notebook on EC2, the suggestions from VScode (e.g. autocomplete) come much later than those from Copilot. Plus, often it takes 1-2 seconds to start execution of a cell.

Is this while using remote desktop to the EC2 instance?

Searching in a long notebook it's slow and sometimes does not even work.
I had instances of writing a markdown, pressing execute (which does not execute anything, just gets you out of editing) and then the cells looks empty, taking the same space but just a big box empty. If I edit again I see my original text, but this is defo a bug. Not a big deal though.

These should be separate issues to get more info - the markdown one certainly sounds like a bug, but I've never seen something like that and not sure how it would happen

@marctorsoc
Copy link

sounds similar to #1240

yup, you can see that the last comment is mine :) (from my work GH)

Is this while using remote desktop to the EC2 instance?

Just to be very clear, I'm not using any extra layer to connect to the EC2 instance. Just VScode, who connect via ssh to the remote

These should be separate issues to get more info - the markdown one certainly sounds like a bug, but I've never seen something like that and not sure how it would happen

Do you suggest I open new issues for each of them? The latter certainly is rare, and might be due to an unstable internet connection (even though I never saw something like this in Jupyter after 5-6y, and I've been working with VScode for 6 months and saw it 5-6 times).

@amunger
Copy link
Contributor

amunger commented Jul 21, 2023

ok, I created an issue for the markdown bug. Could you create a new issue for the search performance with more info, like how large the notebook is? and is this also when using ssh remote?

@marctorsoc
Copy link

marctorsoc commented Aug 2, 2023

I can confirm the search issue only happens with ssh remote, and when the connection is not stable. I've tried locally, doing the notebook as large as possible, or with a notebook with problems when in remote, and everything is fine. I'm sure the other issue comes from the same cause. In general, I have many problems with VScode with an unstable connection. I'm now during holidays in a house that has a mobile connection only, and I can literally watch youtube videos, but VScode sometimes gets blocked with a notebook in remote to EC2...

(sorry to be so negative, VScode is great when I'm on fiber, and I actually accept the compromise of these issues when I'm not)

@amunger amunger added bug Issue identified by VS Code Team member as probable bug perf Performance issues notebook-remote Applies to remote Jupyter Servers and removed info-needed Issue requires more information from poster feature-request Request for new features or functionality labels Dec 6, 2023
@amunger
Copy link
Contributor

amunger commented Mar 29, 2024

closing in favor of #14459 (unless your seeing perf issues with a small notebook)

@amunger amunger closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2024
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 notebook-remote Applies to remote Jupyter Servers perf Performance issues
Projects
None yet
Development

No branches or pull requests

4 participants