jupyter_client: 7.1.0: this version makes JupyterLab very slow

This is first reported at https://github.com/jupyterlab/jupyterlab/issues/11811

In short,

  1. Basic mathematical calculations cannot display the result immediately, and it takes at least 1 second.
  2. %timeit shows that mathematical computations themselves are fast.

The old versions of jupyter_client works well (6.1.12 and 7.0.6) but the latest 7.1.0 slowed it down.

A video for this: https://user-images.githubusercontent.com/20700283/148743325-85aa0fd5-b4f9-4a5d-97af-65d51fa36491.mp4 (4K resolution, 75 seconds, about 59MiB)


Update: This problem only occurs on Windows OS. I tested it on Linux (CentOS 7) with no problems. @kevin-bates tested on macOS with no problems.


Update 2: My package versions:

ipykernel                 6.4.1
ipython                   7.29.0
ipython_genutils          0.2.0
jupyter_core              4.9.1
jupyter_server            1.4.1
jupyterlab                3.2.1
jupyterlab_pygments       0.1.2
jupyterlab_server         2.10.2
nbclassic                 0.2.6
nbclient                  0.5.3
nbconvert                 6.1.0
nbformat                  5.1.3
python                    3.9.7

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

PPS: The change was introduced in version 1.1.0, but didn’t surface for users until they moved to Python 3.8 or greater.

@vidartf The base env of anaconda cannot produce this, you need create a new env. (Because base env doesn’t install jupyter_client 7.1.0)

Use this command to create a new env that can reproduce:

conda create -n testenv jupyterlab jupyter_client=7.1.0

Degrading nbclassic and jupyter_server doesn’t affect the result.

@KaneGreen I’ve tested on Windows 10 with a fresh conda env with the latest of all packages, and I see no slow behavior. I also tried degrading nbclassic and jupyter_server to the versions you listed, but couldn’t reproduce it then either. Would you mind posting a full pip freeze list? (feel free to put it in a <details><summary>requirements.txt</summary><pre> list goes here </pre></details> wrapper to make it collapsible). If that is not possible, can you reproduce this in a fresh env?