Code incredibly slow when run in a notebook wrt terminal #17172
Unanswered
thistlillo
asked this question in
Questions and Answers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to understand why the python code I run in a Jupyter Notebook -- in Visual Studio Code connected remotely to a server -- sometimes becomes incredibly slower than in the terminal -- always connected remotely to the same server. Clearly the code runs in the same Python environment.
I have a gigantic xarray, from which I need to select one variable and turn it into a numpy array.
I cannot share the data, so I will only share the Python code:
When run in a terminal, I get (I share the image):
When run in a Jupyter notebook, the time needed to perform the same operation goes from seconds to more than a minute.
Why? And what can I do to prevent the system from slowing down?
This is not the only code that is affected by this behaviour, VSC+Jupyter sometimes slows down even when run locally and with other scripts/functions.
Beta Was this translation helpful? Give feedback.
All reactions