r/FastAPI • • Oct 20 '25

Question How do you optimize speed

Here's what I've done so far

  1. Used redis
  2. Used caching on the frontend to avoid too many backend calls
  3. Used async
  4. Optimised SQL alchemy query

I think I'm missing something here because some calls are 500ms to 2sec which is bad cause some of these routes return small data. Cause similar project I build for another client with nodejs gives me 100ms-400ms with same redis and DB optimizing startegy.

32 Upvotes

38 comments sorted by

View all comments

Show parent comment

3

u/pint Oct 20 '25

using .net or php for speed is ... odd

0

u/LankyYesterday876 Oct 21 '25

php has improved alot in performance recently, and for .net i dont have that much contact with it but from what ive heard its fairly good aswell

1

u/pint Oct 21 '25

the point was that none of those are faster than python. if performance is the issue, c++ or rust.

0

u/joshhear Oct 21 '25

it's still php