Performance: First FastAPI application
MEDIUM IMPACT
This affects the server response time and initial page load speed for API-driven applications.
from fastapi import FastAPI app = FastAPI() @app.get("/data") async def get_data(): return {"message": "Hello World"}
from fastapi import FastAPI import time app = FastAPI() @app.get("/data") def get_data(): time.sleep(3) # Simulate slow blocking operation return {"message": "Hello World"}
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Blocking synchronous endpoint | N/A | N/A | Delays initial paint | [X] Bad |
| Async non-blocking endpoint | N/A | N/A | Enables fast initial paint | [OK] Good |