py-frameworks-bench icon indicating copy to clipboard operation
py-frameworks-bench copied to clipboard

benchmarks do not reflect recommended usage

Open adriangb opened this issue 4 years ago • 1 comments

Several frameworks's apps are written in a manner that does not reflect the usage suggested in their docs.

For example, the FastAPI documentation suggests using File() to have files extracted from forms and injected: https://fastapi.tiangolo.com/tutorial/request-files/. But in the benchmarks the Request.form is used just like in Starlette. This is obviously going to be faster, but then it's not using any of the features the framework provides on top of Starlette. If that's what users were doing, they'd be using Starlette.

I suggest that the apps get restructured to better reflect the documented usage of each framework. That is much more useful to users (and framework developers) and would help highlight issues like https://github.com/tiangolo/fastapi/issues/4187

adriangb avatar Jan 22 '22 14:01 adriangb

@klen are you open to this? I'm happy to submit PRs, but I don't want it to seem like I am unilaterally trying to hamper specific web frameworks in the benchmarks, so I won't do anything without your explicit approval.

adriangb avatar Jun 23 '22 19:06 adriangb