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

Installing the extension cause the browser to hang for 30 to 60 seconds periodically #45

Open
wkvolkman opened this issue Feb 2, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@wkvolkman
Copy link

Description

I have installed the extension via pip recently into a fresh upgrade of Jupyter lab to 3.2.8 on Windows platform using python3.7.
While working with the first 10 cells in a notebook everything seems to be fine. As I start working in cells beyond those first 10 the UI will freeze for seconds at a time and it freezes more frequently and longer as I am editing or working in around cell 30. If I scroll down to cell 100 or so it is like I cannot use my browser. Also the further down I get in a notebook it will stop putting the cell decorations on the cells. The browser (Firefox v 94) will throw up a dialog saying that the web page is slowing it down, do I want to stop it. I've uninstalled most of the other extensions trying to narrow it down and it was when I removed this extension that the problem stopped.

Reproduce

pip install jlab-enhanced-cell-toolbar
jupyter lab build

Expected behavior

All cells render the toolbar and the browser remains responsive while working

Context

I cannot provide the specific information requested as it happens on a work machine and by security policy not allowed to share details.

@wkvolkman wkvolkman added the bug Something isn't working label Feb 2, 2022
@fcollonval
Copy link
Member

Thanks for reporting @wkvolkman

Would you mind trying with those settings to see if it is still happening?

Go to menu Settings -> Advanced Settings Editor -> Notebook and in the right pane (User Preferences) paste the following:

{
    "renderCellOnIdle": false,
    "numberCellsToRenderDirectly": 10000000000000
}

@wkvolkman
Copy link
Author

Well behavior has changed slightly. The initial workspace load takes minutes now instead of 10s of seconds, I have 7 work spaces with about 80 tabs each. Stepping through the cells in the notebook where I was having the most trouble I was able to execute 17 cells and then had a 20 second freeze of the UI. I stepped a couple of more cells without issue and then again a 20 second freeze (the browser dialog started to come up then left again). Moving between cells seems much slower. I'm heading to bed but will play around with it more tomorrow afternoon.

@fcollonval
Copy link
Member

Thanks for testing - yes for a scenario like yours with lots of tabs open simultaneously this extension will make it even slower ( 😭 ) as it increases performance issue of JupyterLab.

@wkvolkman
Copy link
Author

wkvolkman commented Feb 3, 2022

Well initially it seemed to help however later this afternoon the previous hanging for 30+ seconds returned. The overall drawing of updates is much slower with these settings. I do not know if it's related however the regular button bar at the top of the notebook vanished (and the debugger icon moved far left). On the right are ellipses which I have to click to see the old toolbar now flush right. Is there some javascript fu I should look for in the console or execute to aid with gathering information about this?

Update, I've gotten to 31 cells and jupyterlab has become unusable. Clicking on a cell takes almost a minute to focus and I've been able to type a whole line of input before it is echoed. Nice extension however I cannot use it.

@fcollonval
Copy link
Member

JupyterLab has known performance issues when lots of documents are opened (or when a long notebook is). The behaviour you are seeing with the notebook toolbar itself is a bit weird because the ... button should be appearing only if the toolbar width is too small to contains all items. But I guess because the browser is having a hard time to recompute the layout, that feature is bringing troubles...

I'm working on those performance issues in core JupyterLab. But this is a long task. I'll post here when it is done later this year if you want to give another try at this extension 😉

Thanks a lot for providing all those informations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants