Performance: Async ORM operations
MEDIUM IMPACT
Async ORM operations affect how quickly data queries complete without blocking the main thread, improving interaction responsiveness.
async def get_users(): users = [user async for user in User.objects.all()] return users # Called in async view with await
def get_users(): users = User.objects.all() return users # Called in async view synchronously
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous ORM calls in async views | Minimal | 0 | 0 | [X] Bad |
| Async ORM calls with await | Minimal | 0 | 0 | [OK] Good |