Does NextApiResponse.write() executes on the event loop (potentially blocking it)? #63877
Unanswered
escherstair
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I developed a next.js app that uses
NextApiResponse.write()
to answer to http client requests.I see that if I have 20 or 30 requests, some of them has a large lag (up to 200 ms).
When I profile my application with 0x it seems to me that
NextApiResponse.write()
is executed on the event loop and it seems strange to me.I would expect that a "network" function should be offloaded by default.
Is there some point I don't understand well?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions