-
Notifications
You must be signed in to change notification settings - Fork 29
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
The first run after each new Zeabur deployment is always quite slow (takes 10+ secs) #49
Comments
I added some logging:
Logging is added in Python-Type-Challenges/views/challenge.py Lines 147 to 154 in d900b70
It's clear that pyright takes 28s to finish! Given subsequent runs take significantly less time, I think this is due to pyright needs to generate indexes and cache the first time it runs. Given we don't really need to analyze third-party libraries installed in the virtualenv (which pyright does by default), I'll see how can we disable this behavior. |
Further adding Overall takes ~27s
Detailed:
So out of 27s, installing node packages takes 14s, analyzing takes 2s. It's still unclear where the other 10s is spent on, but at least we know installing node packages is the biggest contributor to slow run |
Reading https://github.com/microsoft/pyright/blob/main/docs/configuration.md, I can't find any option to pre-install node_modules. It mentions ignoring files when analyzing, but since we only checked one file (see above), I don't think this will help. Given that, seems the only way is to simply pre-run pyright upon server start, to warm things up. |
Tested on the debug branch and it worked well. |
It seems pretty reproducible, but I'm not sure if this is our problem or theirs
The text was updated successfully, but these errors were encountered: