-
-
Notifications
You must be signed in to change notification settings - Fork 200
Add FastAPI HTTP request benchmark #440
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi! Just passing by and wanted to put my two cents in. I’m a bit unsure about adding this to the benchmark suite though. pyperformance already have an async HTTP benchmark with Tornado (bm_tornado_http) that covers Python async request handling. FastAPI, by contrast, pulls in extra layers: especially Pydantic, which does validation in Rust. I worry it could add noise rather than useful data about Python performance, if there’s ever a regression in this benchmark, it might be hard to tell what caused it. Maybe this fits better as an external benchmark rather than part of the core suite? Not trying to nitpick, just genuinely curious what’s the goal to measure here? For a real-world minimal FastAPI app, this example lacks database or business logic and only serves semi-static responses, so I’m not sure what Python-side behavior it’s meant to represent |
|
I think there are a couple things to consider here:
|
I discovered that we didn't have a benchmark in here for FastAPI so I figured I'd add one in to start. This is a pretty basic example of canonical FastAPI request handling.