Load performance of large notebooks on Windows (JL 3.x)

Hi all, A customer is experiencing performance issues when editing large notebooks (>8 MB) and, 100+ cells, and matplotlib plots. The issue is reproducible on Windows using JL 3.x. Here’s the problem description as written by my colleague:

I did some testing and I can reproduce the issue on Windows VM (2CPU, 4GB RAM). I see that loading 10Mb notebook with matplotlib plots in the local installation of JupyterLab 3.6.2 without any extension installed takes about 2-3 minutes. I also checked the JL process while loading a notebook. I see that the memory consumption increased from 200Mb to 700Mb while loading a notebook. JL constantly used >50% CPU. The JL browser window stopped responding and the browser showed Page unresponsive warning. I tested Notebook loading in JL with Chrome and Firefox. After the notebook is loaded switching between editor tabs is very slow. I also measured performance in the browser and I see that fromJSON function took most of the loading time.

I tested the same notebook in the pre-release version of JL 4.0 and I was not able to reproduce the issue: Notebook loading is very fast and I do not see any issue while editing notebook and navigating between JL tabs.

Is it a known issue in JL 3.x? If yes, is it planned to fix it in JL 3.x version? Is there a workaround available which we could provide to the customer? During the session with the customer we saw that it is not possible to edit a notebook. Interface always freezes, and Page unresponsive warning is shown.

I (Kevin) suspect this may be part of the RTC-related changes, but any insights into where the fix is and it’s potential for a back-port to 3.x would be appreciated. When I asked about non-Windows platforms on JL 3.x, my colleague said the initial load is a bit slow, but switching between editor tabs is fast, so this seems like it might be Windows-specific.

Btw, its awesome this isn’t seen in 4.0 - good stuff! Unfortunately, it might be a bit for some folks to adopt 4.0 so just checking. Any insights would be appreciated.

Kevin.