What about using Granian, a Rust ASGI webserver over Uvicorn? #3039
itsmeadarsh2008
started this conversation in
Ideas / Feature Requests
Replies: 2 comments 4 replies
-
Interesting. But according to the stats "Granian Asgi [POST] (c256)" and file responses "Granian (pathsend) (c128)" are slower than with Uvicorn. Maybe we can make grain an optional dependency? Would you like to experiment with such a replacement? Might not be a very simple task. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Any Updates? |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
While I was sleeping, a random thought popped into my head - what if we write the ASGI server in Rust to improve the performance of NiceGUI? I searched online and discovered a Rust ASGI server for Python called "Granian". It would be a fantastic idea to replace uvicorn with this.
Here are the details that I received from the repository (Good work by: @gi0baro)
Data Source ⬇ and Repository
Granian benchmarks
VS 3rd party comparison
Run at: Wed 01 May 2024, 21:13
Environment: GHA Linux x86_64 (CPUs: 4)
Python version: 3.11
Granian version: 1.3.1
ASGI
WSGI
HTTP/2
ASGI file responses
Beta Was this translation helpful? Give feedback.
All reactions