@MuwaffaqBadawi Visual studio doesn’t even have fluent UI design of windows 11. The latest has some UI improvement but not even close with other native windows UI.
@mjovanovictech Create, Update, Get, GetAll, Delete. Each one has now atleast 2-4 files. It was before just controller, service, repository (not mandatory), dto.
p95 went from 2270 ms to 217 ms.
Throughput went from 168 RPS to 1,238 RPS.
I changed exactly one line of code.
Thread.Sleep(200) ➜ await Task.Delay(200, ct)
That's it.
Same machine.
Same 400 concurrent users.
Same 200 ms of "work."
The reason it matters this much: Thread.Sleep parks an OS thread. The thread pool only grows at 1–2 threads per second after MinThreads is exceeded.
So with 400 VUs hammering a sync endpoint, requests aren't slow because the work is slow, they're slow because they're queued waiting for a thread that doesn't exist yet.
await Task.Delay returns the thread to the pool while it waits.
Suddenly, 16 threads can serve 400 concurrent requests instead of 16.
I built a .NET 10 lab project that reproduces this on demand and produced the numbers above on a Ryzen 7 4800H. Code + k6 scripts + step-by-step breakdown.
Will share it in 2h in my Newsletter. Join 20k+ engineers and read it: https://t.co/EO5uHB2wVy