playbook/antigravity-awesome-skills/plugins/antigravity-awesome-skills-.../skills/vercel-optimize/references/support-topics/function-duration-io-and-af...

1.0 KiB

id title status candidateKinds frameworks priority citations maxBriefChars
function-duration-io-and-after Function duration, I/O, and post-response work active
slow_route
next@>=15.0.0
75
https://nextjs.org/docs/app/api-reference/functions/after
vercel-react-best-practices:async-parallel
vercel-react-best-practices:server-after-nonblocking
850

Investigation Brief

When wall-clock latency is much higher than CPU time, check critical-path awaits before blaming rendering or compute.

Evidence To Check

Compare cpu.p95, ttfb.p95, and latency.p95. In source, separate dependent awaits from independent awaits, and identify analytics, logging, or notification work that can run after the response.

Do Not Recommend When

Do not wrap dependent operations in Promise.all. Do not replace Promise.allSettled when partial failure handling is intentional.

Verification

Name the awaits that can move, the work that can run post-response, and the observed CPU-vs-wall-clock gap.