-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix uncaught error in async middleware #135
Conversation
How many middlewares / handlers did you have when testing? Surely having like 5-10 would cause a significant difference |
I used the one from bench/polka. Still, I think it will only be when there are about somewhat >50 or >30 that there is a significant diff. |
Codecov Report
@@ Coverage Diff @@
## next #135 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 108 105 -3
=========================================
- Hits 108 105 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hoangvvo! Sorry for the (massive) delay on this.
Confirmed that on my machine, at least with Node 14.15.3, that both this PR and the current next
run at 37.2k and 37.3k req/sec.
This does require Node 8.x, which is technically breaking, but that's what next
is for :)
I turned
loop
into an async function to allow it to be caught innext
. I attempted to test out the performance implication by this change toasync
. This was run onnode v12.16.3
and shows no significant difference but there may be for older versions that I did not get to.this pr:
polka/next
:Closes #134
Closes #164