Performance: Request parsing
MEDIUM IMPACT
Request parsing affects how quickly the app processes incoming data, impacting interaction responsiveness and server response time.
const data = await request.json();
const data = JSON.parse(await request.text());
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual JSON.parse on text | 0 | 0 | blocks main thread causing delayed render | [X] Bad |
| Using request.json() async method | 0 | 0 | non-blocking, allows smooth render | [OK] Good |