Performance: Why databases persist data
MEDIUM IMPACT
This concept affects how data storage impacts application responsiveness and load times when interacting with databases.
async def save_user(data): await db.insert_async(data) # non-blocking async call return {'status': 'saved'}
async def save_user(data): # Save data without async DB driver db.insert(data) # blocking call return {'status': 'saved'}
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Blocking DB calls in FastAPI | 0 (server-side) | 0 | 0 | [X] Bad |
| Async DB calls in FastAPI | 0 (server-side) | 0 | 0 | [OK] Good |