JupyterLab on JupyterHub has very sluggish UI for some users

Hi there!

We have been running JupyterLab in our JupyterHub deployment for some time, and are now starting to see that some users are experiencing a very sluggish UI. Executing cells take a several seconds up to a minute even for the most basic operations like printing and importing small packages.

On the backend we are seeing that the jupyter-labhub process is using 100% CPU, but we do not understand what is causing this.

The really weird thing here is that this is only the case for some of our users, while most of our users are not experiencing any issues at all.

Our initial thought was that the history files was getting too big, so we deleted it for one of the effected users. This did unfortunately not have any impact on the issue.

Could anyone advice us on what may be likely causes of this, or how to debug this?