Maxim Sakhno @maxim-sakhno.bsky.social · 28/01/2026Why use Kahn's algorithm? 🤔 It doesn't just sequence dependencies; it finds batches that can run in parallel. For heavy I/O tasks, this is a massive win. The speedup from concurrency easily outweighs the TaskGroup overhead. 110 1
Maxim Sakhno @maxim-sakhno.bsky.social · 28/01/2026But wait... didn't LiteStar beat FastAPI in their own benchmarks? Ah, they used nested dependencies only! That explains it. 💡 110 1
Maxim Sakhno @maxim-sakhno.bsky.social · 28/01/2026So, what kind of dependency graph are they actually testing? 🧐 Let’s dig into the official benchmark source code. Link: docs.litestar.dev/latest/bench... Take a look at the setup below. What do you see? 👇 110 1