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

7.1.0: this version makes JupyterLab very slow #735

Closed
KaneGreen opened this issue Jan 10, 2022 · 20 comments
Closed

7.1.0: this version makes JupyterLab very slow #735

KaneGreen opened this issue Jan 10, 2022 · 20 comments

Comments

@KaneGreen
Copy link

KaneGreen commented Jan 10, 2022

This is first reported at jupyterlab/jupyterlab#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
@kevin-bates
Copy link
Member

Hi @KaneGreen - this is very odd and I'm currently unable to reproduce this (on a Mac) using jupyter_client 7.1.0, jupyter_server 1.13.1, and jupyterlab 3.2.6. What's odd is that the (few) changes that comprise the 7.1.0 release centered around the kernel's lifecycle management operations (start, shutdown, restart, etc.) and should have no impact on message-based operations (i.e., cell execution). Same goes for the "dependent" updates in Jupyter Server, any recent changes should only affect the lifecycle operations. Could you check what version of jupyter_server you're using as well?

In your referenced lab issue, you mention not seeing this issue using Notebook. Do you know which version of jupyter_client was used in that iteration of your troubleshooting? If it was prior to 7.1.0, could you please try using Notebook against jupyter_clent 7.1.0 - just as another datapoint? Thank you.

@KaneGreen
Copy link
Author

KaneGreen commented Jan 11, 2022

@kevin-bates Sorry, I forgot to mention in this issue: I had this problem on Windows OS.

jupyter_core              4.9.1
jupyter_server            1.4.1
jupyterlab                3.2.1
jupyterlab_pygments       0.1.2
jupyterlab_server         2.10.2
python                    3.9.7

I tried replacing versions for every jupyter* component, only jupyter_client=7.1.0 caused this problem. In other words: just specifying jupyter_client to 7.0.6 or 6.1.12 can avoid the problem without changing versions of other packages.

@kevin-bates
Copy link
Member

in the jupyterlab issue, you mention the following:

Using jupyter-notebook also responds quickly.

Could you please confirm whether that experience was with jupyter_client 7.1.0 or prior to 7.1.0. If the latter, could you please try using jupyter-notebook with jupyter_client 7.1.0 and report back the result?

I don't have a Windows system to try this against, so this may get frustrating if it can't be reproduced by others.

@KaneGreen
Copy link
Author

Could you please confirm whether that experience was with jupyter_client 7.1.0 or prior to 7.1.0. If the latter, could you please try using jupyter-notebook with jupyter_client 7.1.0 and report back the result?

Yes. jupyter_client=7.1.0 works well with jupyter-notebook. It responds quickly.

nbclassic                 0.2.6
nbclient                  0.5.3
nbconvert                 6.1.0
nbformat                  5.1.3

I don't have a Windows system to try this against, so this may get frustrating if it can't be reproduced by others.

I can understand. It would be nice if other Windows users could help us reproduce this problem.

@vidartf
Copy link
Contributor

vidartf commented Jan 13, 2022

@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?

@KaneGreen
Copy link
Author

@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.

@kevin-bates
Copy link
Member

Thanks for looking at this @vidartf! I agree that capturing the package list is the next step.

@KaneGreen and I have been discussing this on the related issue in Lab and I'm asking we move that discussion here. I thought jupyterlab/jupyterlab#11811 (comment) provided some helpful information and seems to imply the delay may be in handling the execute_result. I had asked we split the server and kernel envs to determine if that delay might be on the ipykernel side since it too uses jupyter_client, but realized (this morning) that we'd have seen a delay using Notebook if that was the case.

Kane, do you know if you have any additional server or lab extensions installed?

@KaneGreen
Copy link
Author

KaneGreen commented Jan 13, 2022

Here is my total conda package list:

conda list command output
# packages in environment at C:\ProgramData\Anaconda3\envs\testenv:
#
# Name                    Version                   Build  Channel
anyio                     2.2.0            py39haa95532_2    defaults
argon2-cffi               20.1.0           py39h2bbff1b_1    defaults
async_generator           1.10               pyhd3eb1b0_0    defaults
attrs                     21.2.0             pyhd3eb1b0_0    defaults
babel                     2.9.1              pyhd3eb1b0_0    defaults
backcall                  0.2.0              pyhd3eb1b0_0    defaults
bleach                    4.1.0              pyhd3eb1b0_0    defaults
brotlipy                  0.7.0           py39h2bbff1b_1003    defaults
ca-certificates           2021.10.26           haa95532_2    defaults
certifi                   2021.10.8        py39haa95532_2    defaults
cffi                      1.15.0           py39h2bbff1b_0    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
colorama                  0.4.4              pyhd3eb1b0_0    defaults
cryptography              36.0.0           py39h21b164f_0    defaults
debugpy                   1.5.1            py39hd77b12b_0    defaults
decorator                 5.1.0              pyhd3eb1b0_0    defaults
defusedxml                0.7.1              pyhd3eb1b0_0    defaults
entrypoints               0.3              py39haa95532_0    defaults
idna                      3.3                pyhd3eb1b0_0    defaults
importlib-metadata        4.8.2            py39haa95532_0    defaults
importlib_metadata        4.8.2                hd3eb1b0_0    defaults
ipykernel                 6.4.1            py39haa95532_1    defaults
ipython                   7.29.0           py39hd4e2768_0    defaults
ipython_genutils          0.2.0              pyhd3eb1b0_1    defaults
jedi                      0.18.0           py39haa95532_1    defaults
jinja2                    3.0.2              pyhd3eb1b0_0    defaults
json5                     0.9.6              pyhd3eb1b0_0    defaults
jsonschema                3.2.0              pyhd3eb1b0_2    defaults
jupyter_client            7.1.0              pyhd3eb1b0_0    defaults
jupyter_core              4.9.1            py39haa95532_0    defaults
jupyter_server            1.4.1            py39haa95532_0    defaults
jupyterlab                3.2.1              pyhd3eb1b0_1    defaults
jupyterlab_pygments       0.1.2                      py_0    defaults
jupyterlab_server         2.10.2             pyhd3eb1b0_1    defaults
m2w64-gcc-libgfortran     5.3.0                         6    defaults
m2w64-gcc-libs            5.3.0                         7    defaults
m2w64-gcc-libs-core       5.3.0                         7    defaults
m2w64-gmp                 6.1.0                         2    defaults
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    defaults
markupsafe                2.0.1            py39h2bbff1b_0    defaults
matplotlib-inline         0.1.2              pyhd3eb1b0_2    defaults
mistune                   0.8.4           py39h2bbff1b_1000    defaults
msys2-conda-epoch         20160418                      1    defaults
nbclassic                 0.2.6              pyhd3eb1b0_0    defaults
nbclient                  0.5.3              pyhd3eb1b0_0    defaults
nbconvert                 6.1.0            py39haa95532_0    defaults
nbformat                  5.1.3              pyhd3eb1b0_0    defaults
nest-asyncio              1.5.1              pyhd3eb1b0_0    defaults
notebook                  6.4.6            py39haa95532_0    defaults
openssl                   1.1.1m               h2bbff1b_0    defaults
packaging                 21.3               pyhd3eb1b0_0    defaults
pandocfilters             1.4.3            py39haa95532_1    defaults
parso                     0.8.3              pyhd3eb1b0_0    defaults
pickleshare               0.7.5           pyhd3eb1b0_1003    defaults
pip                       21.2.4           py39haa95532_0    defaults
prometheus_client         0.12.0             pyhd3eb1b0_0    defaults
prompt-toolkit            3.0.20             pyhd3eb1b0_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pygments                  2.10.0             pyhd3eb1b0_0    defaults
pyopenssl                 21.0.0             pyhd3eb1b0_1    defaults
pyparsing                 3.0.4              pyhd3eb1b0_0    defaults
pyrsistent                0.18.0           py39h196d8e1_0    defaults
pysocks                   1.7.1            py39haa95532_0    defaults
python                    3.9.7                h6244533_1    defaults
python-dateutil           2.8.2              pyhd3eb1b0_0    defaults
pytz                      2021.3             pyhd3eb1b0_0    defaults
pywin32                   302              py39h827c3e9_1    defaults
pywinpty                  0.5.7            py39haa95532_0    defaults
pyzmq                     22.3.0           py39hd77b12b_2    defaults
requests                  2.27.1             pyhd3eb1b0_0    defaults
send2trash                1.8.0              pyhd3eb1b0_1    defaults
setuptools                58.0.4           py39haa95532_0    defaults
six                       1.16.0             pyhd3eb1b0_0    defaults
sniffio                   1.2.0            py39haa95532_1    defaults
sqlite                    3.37.0               h2bbff1b_0    defaults
terminado                 0.9.4            py39haa95532_0    defaults
testpath                  0.5.0              pyhd3eb1b0_0    defaults
tornado                   6.1              py39h2bbff1b_0    defaults
traitlets                 5.1.1              pyhd3eb1b0_0    defaults
tzdata                    2021e                hda174b7_0    defaults
urllib3                   1.26.7             pyhd3eb1b0_0    defaults
vc                        14.2                 h21ff451_1    defaults
vs2015_runtime            14.27.29016          h5e58377_2    defaults
wcwidth                   0.2.5              pyhd3eb1b0_0    defaults
webencodings              0.5.1            py39haa95532_1    defaults
wheel                     0.37.1             pyhd3eb1b0_0    defaults
win_inet_pton             1.1.0            py39haa95532_0    defaults
wincertstore              0.2              py39haa95532_2    defaults
winpty                    0.4.3                         4    defaults
zipp                      3.7.0              pyhd3eb1b0_0    defaults
package-list.txt
# This file may be used to create an environment using:
# $ conda create --name  --file 
# platform: win-64
anyio=2.2.0=py39haa95532_2
argon2-cffi=20.1.0=py39h2bbff1b_1
async_generator=1.10=pyhd3eb1b0_0
attrs=21.2.0=pyhd3eb1b0_0
babel=2.9.1=pyhd3eb1b0_0
backcall=0.2.0=pyhd3eb1b0_0
bleach=4.1.0=pyhd3eb1b0_0
brotlipy=0.7.0=py39h2bbff1b_1003
ca-certificates=2021.10.26=haa95532_2
certifi=2021.10.8=py39haa95532_2
cffi=1.15.0=py39h2bbff1b_0
charset-normalizer=2.0.4=pyhd3eb1b0_0
colorama=0.4.4=pyhd3eb1b0_0
cryptography=36.0.0=py39h21b164f_0
debugpy=1.5.1=py39hd77b12b_0
decorator=5.1.0=pyhd3eb1b0_0
defusedxml=0.7.1=pyhd3eb1b0_0
entrypoints=0.3=py39haa95532_0
idna=3.3=pyhd3eb1b0_0
importlib-metadata=4.8.2=py39haa95532_0
importlib_metadata=4.8.2=hd3eb1b0_0
ipykernel=6.4.1=py39haa95532_1
ipython=7.29.0=py39hd4e2768_0
ipython_genutils=0.2.0=pyhd3eb1b0_1
jedi=0.18.0=py39haa95532_1
jinja2=3.0.2=pyhd3eb1b0_0
json5=0.9.6=pyhd3eb1b0_0
jsonschema=3.2.0=pyhd3eb1b0_2
jupyter_client=7.1.0=pyhd3eb1b0_0
jupyter_core=4.9.1=py39haa95532_0
jupyter_server=1.4.1=py39haa95532_0
jupyterlab=3.2.1=pyhd3eb1b0_1
jupyterlab_pygments=0.1.2=py_0
jupyterlab_server=2.10.2=pyhd3eb1b0_1
m2w64-gcc-libgfortran=5.3.0=6
m2w64-gcc-libs=5.3.0=7
m2w64-gcc-libs-core=5.3.0=7
m2w64-gmp=6.1.0=2
m2w64-libwinpthread-git=5.0.0.4634.697f757=2
markupsafe=2.0.1=py39h2bbff1b_0
matplotlib-inline=0.1.2=pyhd3eb1b0_2
mistune=0.8.4=py39h2bbff1b_1000
msys2-conda-epoch=20160418=1
nbclassic=0.2.6=pyhd3eb1b0_0
nbclient=0.5.3=pyhd3eb1b0_0
nbconvert=6.1.0=py39haa95532_0
nbformat=5.1.3=pyhd3eb1b0_0
nest-asyncio=1.5.1=pyhd3eb1b0_0
notebook=6.4.6=py39haa95532_0
openssl=1.1.1m=h2bbff1b_0
packaging=21.3=pyhd3eb1b0_0
pandocfilters=1.4.3=py39haa95532_1
parso=0.8.3=pyhd3eb1b0_0
pickleshare=0.7.5=pyhd3eb1b0_1003
pip=21.2.4=py39haa95532_0
prometheus_client=0.12.0=pyhd3eb1b0_0
prompt-toolkit=3.0.20=pyhd3eb1b0_0
pycparser=2.21=pyhd3eb1b0_0
pygments=2.10.0=pyhd3eb1b0_0
pyopenssl=21.0.0=pyhd3eb1b0_1
pyparsing=3.0.4=pyhd3eb1b0_0
pyrsistent=0.18.0=py39h196d8e1_0
pysocks=1.7.1=py39haa95532_0
python=3.9.7=h6244533_1
python-dateutil=2.8.2=pyhd3eb1b0_0
pytz=2021.3=pyhd3eb1b0_0
pywin32=302=py39h827c3e9_1
pywinpty=0.5.7=py39haa95532_0
pyzmq=22.3.0=py39hd77b12b_2
requests=2.27.1=pyhd3eb1b0_0
send2trash=1.8.0=pyhd3eb1b0_1
setuptools=58.0.4=py39haa95532_0
six=1.16.0=pyhd3eb1b0_0
sniffio=1.2.0=py39haa95532_1
sqlite=3.37.0=h2bbff1b_0
terminado=0.9.4=py39haa95532_0
testpath=0.5.0=pyhd3eb1b0_0
tornado=6.1=py39h2bbff1b_0
traitlets=5.1.1=pyhd3eb1b0_0
tzdata=2021e=hda174b7_0
urllib3=1.26.7=pyhd3eb1b0_0
vc=14.2=h21ff451_1
vs2015_runtime=14.27.29016=h5e58377_2
wcwidth=0.2.5=pyhd3eb1b0_0
webencodings=0.5.1=py39haa95532_1
wheel=0.37.1=pyhd3eb1b0_0
win_inet_pton=1.1.0=py39haa95532_0
wincertstore=0.2=py39haa95532_2
winpty=0.4.3=4
zipp=3.7.0=pyhd3eb1b0_0

No extensions are installed.

@KaneGreen
Copy link
Author

Sometimes, there is a delay in the browser, but no delay on the timestamp in the console.

jupyter-lab.exe --debug

[D 2022-01-14 09:46:08.662 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: status (busy)
[D 2022-01-14 09:46:08.663 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: execute_input
[D 2022-01-14 09:46:08.664 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: execute_result
[D 2022-01-14 09:46:11.652 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: status (idle)
[D 2022-01-14 09:46:11.654 ServerApp] Accepting token-authenticated connection from ::1
[D 2022-01-14 09:46:11.656 ServerApp] 200 GET /api/contents?content=1&1642124769669 (::1) 2.00ms
[D 2022-01-14 09:47:11.667 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: status (busy)
[D 2022-01-14 09:47:11.668 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: execute_input
[D 2022-01-14 09:47:11.669 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: execute_result
[D 2022-01-14 09:47:15.037 ServerApp] activity on 29c8922f-7a72-4a5e-a9ca-c417c76791dc: status (idle)

@kevin-bates
Copy link
Member

Sometimes, there is a delay in the browser, but no delay on the timestamp in the console.

Your console output does show delays of 3+ seconds, just like that reported in jupyterlab/jupyterlab#11811 (comment). Are you suggesting these are not related or you didn't notice these delays when posting your comment?

@KaneGreen
Copy link
Author

KaneGreen commented Jan 15, 2022

Your console output does show delays of 3+ seconds, just like that reported in jupyterlab/jupyterlab#11811 (comment). Are you suggesting these are not related or you didn't notice these delays when posting your comment?

I did not notice when posting.

Specifically:
Most commands' status (idle) are output with a 3 second delay in the console. A few commands don't (so I didn't notice).
For commands' output inside the browser, there is an output delay every time.

Besides,
I reproduced this problem on three Windows 10 PCs (two of mine and one of friend's) with the packages in #735 (comment) .

@KaneGreen
Copy link
Author

KaneGreen commented Jan 19, 2022

I found that jupyter_client 7.1.1 is available on conda-forge channel.
So, I tried conda create -n test_newversion -c conda-forge jupyterlab, and there is no delay, it works well! ✔
This conda-forge channel have updated jupyterlab to 3.2.8 and jupyter_client to 7.1.1.

jupyterlab=3.2.8 jupyter_client=7.1.1
 
anyio                     3.5.0           py310h5588dad_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310he2412df_1    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
black                     21.12b0            pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310he2412df_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
certifi                   2021.10.8       py310h5588dad_1    conda-forge
cffi                      1.15.0          py310hcbf9ad4_0    conda-forge
charset-normalizer        2.0.10             pyhd8ed1ab_0    conda-forge
click                     8.0.3           py310h5588dad_1    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1          py310ha857299_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
debugpy                   1.5.1           py310h8a704f9_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
executing                 0.8.2              pyhd8ed1ab_0    conda-forge
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1          py310h5588dad_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.7.0           py310hbbfc1a7_0    conda-forge
ipython                   8.0.0           py310h5588dad_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.1          py310h5588dad_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.1              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1           py310h5588dad_1    conda-forge
jupyter_server            1.13.3             pyhd8ed1ab_0    conda-forge
jupyterlab                3.2.8              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
markupsafe                2.0.1           py310he2412df_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py310he2412df_1005    conda-forge
mypy_extensions           0.4.3           py310h5588dad_4    conda-forge
nbclassic                 0.3.5              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.0           py310h5588dad_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.7              pyha770c72_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.0.1             h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
platformdirs              2.3.0              pyhd8ed1ab_0    conda-forge
prometheus_client         0.12.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
pure_eval                 0.2.1              pyhd8ed1ab_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310he2412df_0    conda-forge
pysocks                   1.7.1           py310h5588dad_4    conda-forge
python                    3.10.2          h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   303             py310he2412df_0    conda-forge
pywinpty                  1.1.6           py310h00ffb61_0    conda-forge
pyzmq                     22.3.0          py310h73ada01_1    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.5.0          py310h5588dad_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310h5588dad_2    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
stack_data                0.1.4              pyhd8ed1ab_0    conda-forge
terminado                 0.12.1          py310h5588dad_1    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tomli                     1.2.2              pyhd8ed1ab_0    conda-forge
tornado                   6.1             py310he2412df_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typed-ast                 1.5.1           py310he2412df_0    conda-forge
typing_extensions         4.0.1              pyha770c72_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0           py310h5588dad_3    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_0    conda-forge

I also tried conda create -n test_newjlab -c conda-forge jupyterlab=3.2.1 jupyter_client=7.1.1, no delay, it works well. ✔

jupyterlab=3.2.1 jupyter_client=7.1.1
 
anyio                     3.5.0           py310h5588dad_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310he2412df_1    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310he2412df_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
certifi                   2021.10.8       py310h5588dad_1    conda-forge
cffi                      1.15.0          py310hcbf9ad4_0    conda-forge
charset-normalizer        2.0.10             pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1          py310ha857299_0    conda-forge
debugpy                   1.5.1           py310h8a704f9_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1          py310h5588dad_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.7.0           py310hbbfc1a7_0    conda-forge
ipython                   7.31.0          py310h5588dad_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.1          py310h5588dad_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.1              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1           py310h5588dad_1    conda-forge
jupyter_server            1.13.3             pyhd8ed1ab_0    conda-forge
jupyterlab                3.2.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
markupsafe                2.0.1           py310he2412df_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py310he2412df_1005    conda-forge
nbclassic                 0.3.5              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.0           py310h5588dad_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.7              pyha770c72_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.0.1             h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
prometheus_client         0.12.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310he2412df_0    conda-forge
pysocks                   1.7.1           py310h5588dad_4    conda-forge
python                    3.10.2          h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   303             py310he2412df_0    conda-forge
pywinpty                  1.1.6           py310h00ffb61_0    conda-forge
pyzmq                     22.3.0          py310h73ada01_1    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.5.0          py310h5588dad_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310h5588dad_2    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
terminado                 0.12.1          py310h5588dad_1    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tornado                   6.1             py310he2412df_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0           py310h5588dad_3    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_0    conda-forge

Next, conda create -n test_newjlab -c conda-forge jupyterlab=3.2.8 jupyter_client=7.1.0, no delay, it works well. ✔

jupyterlab=3.2.8 jupyter_client=7.1.0
anyio                     3.5.0           py310h5588dad_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310he2412df_1    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310he2412df_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
certifi                   2021.10.8       py310h5588dad_1    conda-forge
cffi                      1.15.0          py310hcbf9ad4_0    conda-forge
charset-normalizer        2.0.10             pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1          py310ha857299_0    conda-forge
debugpy                   1.5.1           py310h8a704f9_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1          py310h5588dad_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.7.0           py310hbbfc1a7_0    conda-forge
ipython                   7.31.0          py310h5588dad_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.1          py310h5588dad_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1           py310h5588dad_1    conda-forge
jupyter_server            1.13.3             pyhd8ed1ab_0    conda-forge
jupyterlab                3.2.8              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
markupsafe                2.0.1           py310he2412df_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py310he2412df_1005    conda-forge
nbclassic                 0.3.5              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.0           py310h5588dad_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.7              pyha770c72_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.0.1             h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
prometheus_client         0.12.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310he2412df_0    conda-forge
pysocks                   1.7.1           py310h5588dad_4    conda-forge
python                    3.10.2          h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   303             py310he2412df_0    conda-forge
pywinpty                  1.1.6           py310h00ffb61_0    conda-forge
pyzmq                     22.3.0          py310h73ada01_1    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.5.0          py310h5588dad_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310h5588dad_2    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
terminado                 0.12.1          py310h5588dad_1    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tornado                   6.1             py310he2412df_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0           py310h5588dad_3    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_0    conda-forge

Lastly, conda create -n test_newjlab -c conda-forge jupyterlab=3.2.1 jupyter_client=7.1.0, no delay, it works well. ✔

jupyterlab=3.2.1 jupyter_client=7.1.0
anyio                     3.5.0           py310h5588dad_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310he2412df_1    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310he2412df_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
certifi                   2021.10.8       py310h5588dad_1    conda-forge
cffi                      1.15.0          py310hcbf9ad4_0    conda-forge
charset-normalizer        2.0.10             pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1          py310ha857299_0    conda-forge
debugpy                   1.5.1           py310h8a704f9_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1          py310h5588dad_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.7.0           py310hbbfc1a7_0    conda-forge
ipython                   7.31.0          py310h5588dad_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.1          py310h5588dad_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1           py310h5588dad_1    conda-forge
jupyter_server            1.13.3             pyhd8ed1ab_0    conda-forge
jupyterlab                3.2.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
markupsafe                2.0.1           py310he2412df_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py310he2412df_1005    conda-forge
nbclassic                 0.3.5              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.0           py310h5588dad_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.7              pyha770c72_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.0.1             h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
prometheus_client         0.12.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310he2412df_0    conda-forge
pysocks                   1.7.1           py310h5588dad_4    conda-forge
python                    3.10.2          h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   303             py310he2412df_0    conda-forge
pywinpty                  1.1.6           py310h00ffb61_0    conda-forge
pyzmq                     22.3.0          py310h73ada01_1    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.5.0          py310h5588dad_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310h5588dad_2    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
terminado                 0.12.1          py310h5588dad_1    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tornado                   6.1             py310he2412df_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0           py310h5588dad_3    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_0    conda-forge

So, I am very confused now. I am not able to locate which package this delay is related to.
But I'm still able to confirm that the package list in #735 (comment) can reproduce the problem on Windows.

My guess: maybe both jupyterlab and jupyter_client don't need code changes to fix this. But if conda's default channel can update the versions of these two packages, maybe it will help? (requires more verification)

@kevin-bates
Copy link
Member

Hi @KaneGreen - glad to hear you're moving forward. I suspect there is probably some windows-specific module that is not working quite right outside of the conda-forge channel (I know that packages like pywinpty and pyzmq can be a little finicky when it comes to Windows installations since they are coupled with some platform-specific DLLs, for example).

I don't know what makes one channel different from another, how other channels get updated, or what history there is between Jupyter and CondaForge, but nearly all of the conda installation examples for jupyter packages explicitly reference -c conda-forge.

Given there's a fairly tight relationship to conda-forge and this issue was not reproducible for others (although this latest information may change that), I'm not sure it's worth keeping this issue open since using the conda-forge channel is so well-publicized. I'm sorry we didn't see the "defaults" channel as a hint previously. Perhaps we will moving forward.

I'm going ahead and closing this issue. If there's anyone that could share about the conda-forge aspect of this and perhaps explain why another channel might behave differently despite similar versions of packages, that would be appreciated.

@KaneGreen
Copy link
Author

KaneGreen commented Jan 20, 2022

By comparing the package lists in these two comments (#735 (comment) and #735 (comment)), I found that the version of the jupyter_server package is quite different, while they both have jupyterlab=3.2.1 and jupyter_client=7.1.0.

# default channel
jupyter_server=1.4.1
# conda-forge
jupyter_server=1.13.3

The one in the default channel is too older (for jupyter_server have released many versions in 2021).

In previous tests, I only tried downgrading the version of jupyter_server since it is already the latest version in the default channel (I cannot update it in default channel).
At the time, downgrading the jupyter_server version didn't solve the problem, so I recklessly decided the problem wasn't related to it.

However, since I'm having problem with the jupyterlab=3.2.1 and jupyter_client=7.1.0 in the default channel but not in conda-forge, I tried pinning the version of jupyter_server to 1.4.1 in conda-forge channel and the problem occurred.

command: conda create -n testoldserver -c conda-forge jupyterlab=3.2.1 jupyter_client=7.1.0 jupyter_server=1.4.1

jupyterlab=3.2.1 jupyter_client=7.1.0 jupyter_server=1.4.1
anyio                     3.5.0            py39hcbf5309_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39hb82d6ee_1    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
black                     21.12b0            pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py39hb82d6ee_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
certifi                   2021.10.8        py39hcbf5309_1    conda-forge
cffi                      1.15.0           py39h0878f49_0    conda-forge
charset-normalizer        2.0.10             pyhd8ed1ab_0    conda-forge
click                     8.0.3            py39hcbf5309_1    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1           py39h7bc7c5c_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
debugpy                   1.5.1            py39h415ef7b_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
executing                 0.8.2              pyhd8ed1ab_0    conda-forge
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1           py39hcbf5309_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.7.0            py39h832f523_0    conda-forge
ipython                   8.0.1            py39hcbf5309_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.1           py39hcbf5309_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1            py39hcbf5309_1    conda-forge
jupyter_server            1.4.1            py39hcbf5309_0    conda-forge
jupyterlab                3.2.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
markupsafe                2.0.1            py39hb82d6ee_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py39hb82d6ee_1005    conda-forge
mypy_extensions           0.4.3            py39hcbf5309_4    conda-forge
nbclassic                 0.2.6              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.0            py39hcbf5309_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.7              pyha770c72_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.0.1             h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
platformdirs              2.3.0              pyhd8ed1ab_0    conda-forge
prometheus_client         0.12.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
pure_eval                 0.2.1              pyhd8ed1ab_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py39hb82d6ee_0    conda-forge
pysocks                   1.7.1            py39hcbf5309_4    conda-forge
python                    3.9.9           h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   303              py39hb82d6ee_0    conda-forge
pywinpty                  1.1.6            py39h99910a6_0    conda-forge
pyzmq                     22.3.0           py39he46f08e_1    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.5.0           py39hcbf5309_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0            py39hcbf5309_2    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
stack_data                0.1.4              pyhd8ed1ab_0    conda-forge
terminado                 0.12.1           py39hcbf5309_1    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tomli                     1.2.2              pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39hb82d6ee_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typed-ast                 1.5.1            py39hb82d6ee_0    conda-forge
typing_extensions         4.0.1              pyha770c72_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0            py39hcbf5309_3    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_0    conda-forge

I also tried changing the versions of pywinpty and pyzmq in the conda-forge channel, which seems to have no effect.

In a nutshell, the situation now looks like this:

conda channel python jupyter_client jupyterlab jupyter_server the delay problem
default 3.9.7 7.1.0 3.2.1 1.4.1 ❌ delay
conda-forge 3.10.2 7.1.1 3.2.8 1.13.3 ✔ good
conda-forge 3.10.2 7.1.1 3.2.1 1.13.3 ✔ good
conda-forge 3.10.2 7.1.0 3.2.8 1.13.3 ✔ good
conda-forge 3.10.2 7.1.0 3.2.1 1.13.3 ✔ good
conda-forge 3.10.2 7.1.0 3.2.1 1.4.1 ❌ delay

Do you think this has something to do with jupyter_server?

@kevin-bates
Copy link
Member

Wow - thanks for spending so much time on this @KaneGreen !

Do you think this has something to do with jupyter_server?

Perhaps, although I'm still unable to reproduce this on a Mac. Not sure if this can be generally reproduced on Windows or other platforms given the new information. (@vidartf - might you be able to try a downlevel server on Windows?)

The significant changes in these versions are probably the pending kernels stuff that went into jupyter_client 7.1 and jupyter_server 1.12+, so this might have an implication on backward compatibility.

I'll bring this up for a brief discussion in the server team meeting this morning (in which you're welcome to join - 8 am PST). There will be folks that can probably answer the version-lag on the other conda defaults channel as well.

@KaneGreen
Copy link
Author

Thank you for your attention to this issue. @kevin-bates
However, I'm sorry I can't attend this online meeting, it's late night for my time zone.
The time that I can participate in this issue is relatively limited every day. I'll try to capture the details though, if I run a new test.
I've also been expecting Windows users to get involved.

@vidartf
Copy link
Contributor

vidartf commented Jan 20, 2022

From my binary search of versions, it seems that the performance improves significantly from ver 1.7 to 1.8. The full change log is here: jupyter-server/jupyter_server@v1.7.0...b063117

Given that this only applies to Windows, I assume it is this PR that fixed it: jupyter-server/jupyter_server#513

@vidartf
Copy link
Contributor

vidartf commented Jan 20, 2022

Note: This also means that a work-around can be made for older version if you are able to inject the event loop policy early enough.

@vidartf
Copy link
Contributor

vidartf commented Jan 20, 2022

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.

@kevin-bates
Copy link
Member

Thank you Vidar - this is very helpful and makes sense. It sounds like the version of jupyter_client may have been a red herring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants