I’ve got trouble with Jupyter in vscode. On vs code start-up, my 10 cells “run all” in about 3-4 minutes in a perfectly sensible way (loading the data and heavy calculations take time, but plotting is fast, etc). But re-running cells sometimes takes forever.
As an example, the last cell, which is just plotting the data, took 1.6s on 'run all'. When I instantly re-run that last cell (even without changing the code at all), it takes much longer to run (up to 14 minutes!). Why is that?
It isn’t a CPU or memory problem because those climb to only 30% and 75% during the runs, respectively.
I’ve seen the same error on a Jupyter notebook server. The solution was to disable “Variable Inspector nbextension”. Is there an equivalent solution when running jupyter notebooks on vs code?
UPDATE: It's only the case when the "Jupyter: Variables" pane is open. A lot of variables are shown as loading endlessly. The problem might be that the variables are too big to show?
Versions: vs code 1.73.1 / Jupyter v2022.9.1303220346 / Python 3.10.8 / Windows 11
Note: I have pandas variables, just like in the problem in the above link.