-
Notifications
You must be signed in to change notification settings - Fork 293
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 notebooks after a while become very slow #1622
Comments
@drkg4b Thanks for reporting and sorry about the issue. We do have some performance issues that we are tracking, but if you have any more information about your scenario it might be helpful to know if this would be a similar issue that you are seeing or not. Can you expand a bit on:
Anything in particular that you are working with here? Like the type of code that you are working with? And is it particular cells that cause issues? Or just everything slows down over time? Knowing that would help us to diagnose things. |
@IanMatthewHuff Hi Ian, thanks for getting back to me and for all the hard work! The issue actually started about a year ago, sorry can't remember the exact version, but I hoped it would resolve. The issue happens during normal workflow. Normal python using data science libraries (numpy, sklearn...) even working with small datasets (2K, 3K rows). After a while, there doesn't appear to be a specific trigger, all just starts to lag and the only solution I found is to close and re-open vscode. Restarting the IPython kernel is not enough. Please, do let me know how I can help provide more information. I know that all my colleagues also experience the same issue. |
@drkg4b I asked around on the team and I do have one possible workaround to try. When you first start up a notebook could you try running the following in a cell? |
@IanMatthewHuff Sorry I took a couple of days to give the workaround a proper test. Unfortunately I can still see the issue. Perhaps I should mention that I work with python files (with the What information could I provide to help you? Any logs? |
Yeah, if you could. When things are running slow for your can you go to "Help->Toggle Developer Tools" in VSCode. Then in that developer tools panel go the "Console" tab and save out the log here. I think that if you right click in the console tab you'll have an option to just save the whole thing to a file. Then back here you can just make a new comment and attach that file by dragging it below the comment box. That log might have some info that can help us with diagnosing. |
Dupe of microsoft/vscode-python#10971 |
Hello, |
@Viynne |
@Viynne, I would hazard a guess your issue is this one: We generate SVGs for all plots so that we have something to open in our plot viewer that scales well. You can disable this feature (and the SVG generation) but setting this value:
|
Okay thank you very much for your response. I'll recreate this as a new issue. |
Thank you very much! |
I had a same problem, and I solved it by 'Conda install Jupyter' in my virtual env. Hope it will be helpful :) |
Hi, I am running a basic example of plotnine in jupyter notebook in VSC. The code runs perfectly in jupyter-browser, however, VSC is slow and generates very very large file of 112MB. |
@robertodawid This is a known issue. With our plot viewer support we create both png and svg versions of plot outputs, and the svg plot outputs of plotnine in particular can be very dense and large. The best way to avoid this right now would be to turn off the VS Code setting Juypter: Enable Plot Viewer. The clear the outputs from the notebook that you are working with. This should bring the file back to a more reasonable size. |
May be I can add some more info for this issue:
it works fine in jupyter lab web app |
Loading a large UTF-8 text file (~160 MB), makes the next operations very slow (seems to block), even if it's as simple as function dentition. Version: 1.53.2 (user setup) |
I had the same problem. In the settings, I specifically assigned a 'local' server for Jupyter. It solved the problem. It used to be on 'default'. |
@ShadyAbuKalam @salmanea Please could you install VS Code insiders and give this a test now. |
@DonJayamanne A quick side question: why are the variables are now shown down with the terminal and other stuff instead of the top of the interactive window? I think it's a much better idea to have them on the top. |
This is great feedback, please could you file a separate bug to discuss this.
Agreed, but lets discuss this separately in a separate issue. & thanks a lot for testing this & providing your feedback. |
Closing this issue based on the comments from @salmanea If anyone is still experiencing perf issues, please file a new issue or please feel free to re-open this issu.e |
Bug: Execution of code in Jupyter mode (when using '#%%' to start a cell) after a while becomes painfully slow and laggy and require vscode restart to get back to normal speed.
Steps to cause the bug to occur
Actual behavior
After running for a random amount of time, execution of commands is heavily lagged and require complete restart of the vscode editor
Expected behavior
Smooth operation of the editor without lag or slower than necessary execution of commands.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer
The text was updated successfully, but these errors were encountered: