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
Slow Jupyter lab response following Panel 0.13 installation #3531
Comments
Thanks for the issue. I'm a little bit skeptical because I (and multiple devs I know) use JupyterLab daily with latest Panel installed and experience no such slowdown. Can you provide some more background? Is there anything non-standard about your environment? Are you running it locally? |
I experienced too a slowdown of jupyterlab with panel>=0.13 and jupyterlab>=3. |
Hmm; wonder if it's somehow Panel + JupyterLab + Windows 10? Any other Windows 10 users happily using JupyterLab + Panel and not noticing this issue? |
Only thing I can imagine is that the Jupyter serverextension which gets activated automatically in 0.13 is slowing things down. As an experiment could you maybe try to install the older version (0.12.4) and then run: jupyter serverextension enable panel.io.jupyter_server_extension If that also slows things down we've found the culprit. |
Oh also could you both report your tornado versions. |
Tornado version: 6.1 Re. panel.io.jupyter_server_extension: it makes no difference. Also - local installation, and a completely fresh env (creation command specified above, along with requirements.txt). |
Same tornado version |
I made a small video comparing jupyter lab with panel 0.12.7 & 0.13
|
I'm totally guessing at the cause of this but could you try if there's any change with #3534. |
I'm afraid #3534 doesn't fix it. To make sure I was building the project correctly, I compared 3 versions: the potential fix, latest tag (v0.13.1a7) and the previous release (v0.12.7). I've also recorded short videos demonstrating the problem. In each one, I evaluate the first cell (note the time it takes), and in the 2nd cell I press TAB immediately after the letter panel_.v0.13.1a7.mp4panel_.asyncio_loop_jupyter_fix.mp4panel_.v0.12.7.mp4 |
@xavArtley - I'm not sure, but I've stumbled upon this exact problem, and I believe it has already been fixed (not yet released): #3442 |
Other experiment if I launch classic notebook from command line I have no slow down |
So the change in #3534 actually had no effect at all, will get another PR up which hopefully will have the effect that I originally intended. |
I'm having a problem reproducing this. When I install 0.13.0 from pip or conda I see the slowdown but if I do a develop install locally I don't. How were you guys installing from the branch? |
I don't use a developpement version. I only use pip version. |
A proper |
My former results are from a plain |
So git bisect does blame: Patch asyncio event loop policy on windows (#3339), which means my initial guess was correct, just the fix wasn't right. This does confuse me though because according to https://github.com/jupyter/notebook/pull/5907/files the WindowsProactorEventLoopPolicy should be fine for tornado>=6.1 and python>=3.8. |
Nevermind, reading that PR, it was actually reverted because:
So I'll have to find a way to detect properly if we are running in Jupyter and not apply that patch. |
I'm afraid something weird is still going on - There's a caveat, though: I wasn't able to completely follow the dev setup guide, specifically My exact setup commands are as follows:
Above env reproduces the problem. |
Fixed in #3537 |
Hurray! On that note - although I've just recently started using Panel, I find it extremely valuable & powerful. Thank you, and all those involved, for this great project. |
Thanks for the kind words and glad we could figure this out. Will release Panel 0.13.1 later today. |
ALL software version info
Windows 10 Business, 10.0.19044 Build 19044
Python 3.9.12
Conda 4.12.0
jupyterlab 3.4.2
panel 0.13.0
(and various others; see requirements.txt below)
Description of expected behavior and the observed behavior
Following installation of Panel 0.13.0, Jupyter lab becomes very slow to respond. This can be seen in various operations, e.g. cell evaluation, autocompletion, or interactive widget response. Operation which are normally instantaneous (e.g. evaluating
a=5
) can take several seconds (2 up to 5) to complete.Note that this is without importing anything, specifically not even Panel.
Trying to narrow down the origin of the problem, it seems that previous versions of Panel do not exhibit this behavior. Specifically, I've downgraded to Panel=0.12.6 or 0.12.7, and everything goes back to normal.
Complete, minimal, self-contained example code that reproduces the issue
Creating a new minimal env:
yields the following slow environment - requirements[Panel_0.13.0].txt
This is fixed by downgrading to Panel=0.12:
which yields a normal-response environment - requirements[Panel_0.12.6].txt
(checked with 0.12.7, which produces the same results as 0.12.6)
Stack traceback and/or browser JavaScript console output
N/A
Screenshots or screencasts of the bug in action
(I can added if needed)
The text was updated successfully, but these errors were encountered: