websockets.legacy is deprecated & is responsible for a large amount of start-up import latency #2758
Unanswered
fmmoret
asked this question in
Potential Issue
Replies: 1 comment
-
|
self time | cum time |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
On my slow cloud VM, the imports caused by the legacy modules cost ~20% of my import time for uvicorn along the start-up critical path.
Uvicorn uses a mix of the legacy & non-legacy imports.
Here's a screenshot of the offending legacy imports

I don't know how much the alternative non-legacy paths would save, but hopefully there is more module cache overlap amongst the solely non-legacy modules
Beta Was this translation helpful? Give feedback.
All reactions