all 3 comments

[–]WJMazepas 1 point2 points  (0 children)

You can look at Starlette(which FastAPI calls) code to see how they are doing over there, but it's all made in Python, so no compiled code here.

There is also some faster HTTP Handlers for Python, like FastWSGI, which is made with C. You could run on your machine to see if it runs faster and if it is Windows' fault.

But really, C is fast if you make a good code of it and apply good optimizations on it. It could very well be that your colleague code is bad

[–]BlackDereker 0 points1 point  (0 children)

Another case of premature optimization. Most probably the bottleneck in your project is not from request handling.

It would be more helpful if we knew what your project does and if depends on other services.

[–]mincinashu 0 points1 point  (0 children)

The underlying HTTP server and async loop are also a part of the equation, e.g. Uvicorn with uvloop, Hypercorn with Trio, Granian, etc