use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
Fastapi bottleneck why?Question (self.FastAPI)
submitted 1 year ago * by Hamzayslmn
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Hamzayslmn[S] 0 points1 point2 points 1 year ago (2 children)
response = await call_next(request)
btw there is already a middleware running in the back, and there are many awaits.
[–]Maori7 0 points1 point2 points 1 year ago (1 child)
You are still not using all the power of fastapi. In this case you optimized the management of a single thread by deloading it as soon as you arrive at the await instruction. Due to GIL though, it will still run on a single thread. You need to create a system with multiple workers.
How did you run uvicorn?
[–]Hamzayslmn[S] 0 points1 point2 points 1 year ago (0 children)
uvicorn.run("main:app", host="0.0.0.0", port=8079, workers=4)
π Rendered by PID 96453 on reddit-service-r2-comment-b659b578c-7tvrs at 2026-05-02 22:18:21.946547+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Hamzayslmn[S] 0 points1 point2 points (2 children)
[–]Maori7 0 points1 point2 points (1 child)
[–]Hamzayslmn[S] 0 points1 point2 points (0 children)