Sign in

Arjun Mehta

@pachanpresent.bsky.social
15 followers 62 following 4 posts

Python Developer, 5+ years of experience

PostsRepliesMedia
Reposted by Arjun Mehta
Maxim Sakhno @maxim-sakhno.bsky.social · 12/02/2026
Testing #FastAPI vs #LiteStar with nested empty deps (0-5 levels). Both show smooth perf degradation, unlike LiteStar's flat deps with TaskGroup. Still, 5 deps = 28% drop for LiteStar — DI overhead is significant even when deps do nothing. #Python
A bar chart comparing the performance of LiteStar (orange bars) and FastAPI (green bars) in Requests Per Second (RPS) as the number of dependencies ('Num Deps') increases from 0 to 5. The data shows that LiteStar consistently maintains a higher throughput than FastAPI across all dependency counts. For example, at 0 dependencies, LiteStar reaches 45573 RPS versus FastAPI's 37004 RPS. At 5 dependencies, LiteStar holds 32877 RPS while FastAPI drops to 26463 RPS.
042 4
Arjun Mehta @pachanpresent.bsky.social · 10/02/2026
I was expecting this comparison!
000 0
Arjun Mehta @pachanpresent.bsky.social · 06/02/2026
Go watch this!
000 0
Arjun Mehta @pachanpresent.bsky.social · 03/02/2026
I haven't known about such a big resource consumption of DI
010 1
Arjun Mehta @pachanpresent.bsky.social · 29/01/2026
Will follow this issue
020 2
Reposted by Arjun Mehta
Maxim Sakhno @maxim-sakhno.bsky.social · 28/01/2026
Is #LiteStar faster than #FastAPI? Benchmarks say yes, but look at Dependency Injection. 📉 Adding just 2 flat dependencies significantly degrades the throughput. I dug into the source to find why. Thread: TaskGroups, Kahn's algorithm & performance trade-offs. 🧵 #Python #Backend #WebDev
A bar chart titled "LiteStar" showing Request Per Second (RPS) performance across different numbers of dependencies (0 to 5). The RPS drops from 41,451 with 1 dependency to 26,492 with 2 dependencies. A red arrow points to this 36% decrease with a handwritten caption asking "Why?".
362 6