Most devs know ConfigureAwait(false)…
But few actually know when to use it — or how much performance it saves.
⚠ Problem
Default awaits try to resume on the captured context (UI thread / ASP.NET request context).
This slows down:
-
high-load async APIs
-
microservices
-
background tasks
✔ Real Fix
Use ConfigureAwait(false) in library code, background workers, hosted services:
await DoWorkAsync().ConfigureAwait(false);
💡 Life-Saving Rule
❌ Don’t use it in controllers, Razor pages, or anything touching UI.
✔ Use it everywhere else.
