summaryrefslogtreecommitdiff
path: root/ext/http/01_http.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-09-27 13:19:24 +0200
committerGitHub <noreply@github.com>2021-09-27 13:19:24 +0200
commit9167f0c6bda44846a9c54712ae64d05383bdfc3e (patch)
tree57819236b8346f3b096c2a5417942049ec8fccb5 /ext/http/01_http.js
parentff3a17b72d7e10db4a0ca68afbf2d40bf280431c (diff)
perf(fetch): optimize newInnerRequest blob url check (#12245)
Avoid "blob:" prefix check on requests built in the http module since those can never be blob objects Reduces cost of `newInnerRequest()` from 20ms to 0.1ms in my profiled run on ~2.5M reqs
Diffstat (limited to 'ext/http/01_http.js')
-rw-r--r--ext/http/01_http.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js
index 723293689..2681edff8 100644
--- a/ext/http/01_http.js
+++ b/ext/http/01_http.js
@@ -103,6 +103,7 @@
url,
headersList,
body !== null ? new InnerBody(body) : null,
+ false,
);
const signal = abortSignal.newSignal();
const request = fromInnerRequest(innerRequest, signal, "immutable");