| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Import http2 internal bindings on each collectHttp2Stats call is not required.
Sorry, something went wrong.
Sorry, something went wrong.
Import http2 internal bindings on each collectHttp2Stats call is not required. PR-URL: #29419 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Import http2 internal bindings on each collectHttp2Stats call is not required. PR-URL: #29419 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Nearly ~119ns for each collectHttp2Stats call.
const http2 = internalBinding('http2'); => 20001: 36.200362ms
if (http2 === undefined) http2 = internalBinding('http2'); => 20001: 33.814263ms
(36.200362 - 33.814263) * 1e6 / 20001 = 119
Same lazy require in net module: https://github.com/nodejs/node/blob/v12.9.1/lib/net.js#L940
Benchmarked with:
Code in perf_hooks.js was changed to: