-
Notifications
You must be signed in to change notification settings - Fork 121
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
Klein adds significant performance overhead over a twisted.web server #755
Comments
Initial investigation suggests no obvious Klein-side improvements, other than a minor 1% improvements. Possibly would benefit from additional performance optimizations on the Twisted side though that weren't exposed by previous benchmarks. |
Is I see |
If it's for use in production then it should be as fast as is reasonable. |
How much of it is happening in Klein vs. e.g. Werkzeug? |
Werkzeug is pretty minimal. It's mostly additional twisted.web interactions (therefore places where twisted.web optimizations might help), twisted Deferreds, and the fact that klein is very forgiving in what you can return. Architectural improvements for the latter might involve looking at function return signatures and assuming they're accurate, maybe, so you don't have to all the |
And it's also possible there's work being done on in klein that's duplicative to what twisted.web does. |
A minimal hello world benchmark, just routing "/" and returning a string, is half the speed of the equivalent minimal twisted.web server.
I will start investigating where the performance overhead is, and hopefully find some places to optimize.
The text was updated successfully, but these errors were encountered: