-
Notifications
You must be signed in to change notification settings - Fork 148
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 startup on a cloud-hosted Hub #851
Comments
Thanks for opening this. Do you have any reason to believe that the performance issues are related to the number of users in the deployment, or do you think that detail is unrelated to the root cause? |
This previous issue seems to be describing the same problem: #796. I think that the commit description is right: we are checking for installed language servers which takes time. It might take even more on Windows due to the expansion of the search path included in #731 (unreleased yet). @yuvipanda, did you try to disable auto-detection of language servers with jupyterlab-lsp/python_packages/jupyter_lsp/jupyter_lsp/manager.py Lines 122 to 139 in b895b4e
You might want to open a PR by changing the autodetect traitlet to The autodetection logic is in: jupyterlab-lsp/python_packages/jupyter_lsp/jupyter_lsp/manager.py Lines 228 to 288 in b895b4e
While profiling would be needed, my educated guess is that:
Further, reworking these two lines could reduce the startup time penalty by up to 50% (probably less): jupyterlab-lsp/python_packages/jupyter_lsp/jupyter_lsp/manager.py Lines 119 to 120 in b895b4e
Since we could first find all servers and then filter that list to installed servers. Pull requests welcome :) I answered on the completer topic in: #566 |
@ellisonbg don't think it's related to the number of users, they're fairly well isolated @krassowski we did not turn it off, I think that would have helped with startup time for sure! Not sure it would have helped with the user lag tho. When we re-enable it,finding a way to constrain the servers it looks for seems the way to go. Alternatively, it would be nice if looking for servers doesn't block jupyter_server startup! |
> Alternatively, it would be nice if looking for servers doesn't block jupyter_server startup! Oh yes, that would be ideal. We should make it async but from a quick skim, it would be a potentially breaking change for the next major version, since frontends do not know that they need to await for initialisation and we only retry the relevant endpoint twice 10 seconds apart (so it should work on most machines but no guarantees): jupyterlab-lsp/packages/jupyterlab-lsp/src/manager.ts Lines 35 to 36 in 2a524df
And we would needed to communicate specs collection errors on client side too. |
Thanks for the feedback 😍 ! Thanks for reporting this rather than forking, or just badmouthing it elsewhere. As you note, a lot of folk have a lot of opinions on how this stuff should work for their specific use case, and for the most part, we've had to optimize for the single-user, multiple-launch experience. I've found "just" and "need" to come up very frequently, which have become some of my least favorite words in working on FOSS. There are a ton of things at a managed hub level that would make this experience more fun, especially #184. I'd really love more sourcegraph-like features to work out of the box... but more about that later. At any rate, lazy loading servers would move this from server startup to (probably) first opening of any document, as we wouldn't know in advance which mimetypes had servers. Some thoughts:
At any rate, I'll take a look... |
…gh-880-mk2-use-server-http-settings
@fperez @yuvipanda we released jupyterlab-lsp 4.0 which includes #882. Would you like to give it another try and see if the startup time is satisfactory now? |
I just did so last night @krassowski! So far it's looking good, many thanks - we'll keep you posted. It feels a lot better in my lightweight testing (and I just added your suggested TeX support with texlab/tectonic, which I'm falling in love with!! |
Description
We (well, @yuvipanda and team did the hard work) installed the LSP tools for a cloud-hosted hub I use to teach a ~1,200 student course this term. Unfortunately Yuvi and team found performance issues - this commit describes slow startup times.
In regular usage, I also noticed tab-completion being slower than usual, to the point where it interferes with the typing workflow (to save typing, tab completion really needs to keep up with ~ 70 wpm speeds, which means its latency cap should be very, very tight).
Eventually we disabled it as for us, smooth performance of the hub is critical. Yuvi may have more details perhaps.
I'm sorry not to have more specifics, but at least flagging it here for the team. In the long run I hope we'll be able to deploy this in production everywhere, as I'd love to teach students with these enhanced capabilities.
Thanks for the great work, btw!
cc @ellisonbg
The text was updated successfully, but these errors were encountered: