summaryrefslogtreecommitdiff
path: root/ext/http/lib.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-05-30 18:02:52 -0600
committerGitHub <noreply@github.com>2023-05-30 18:02:52 -0600
commit489d2e81c3e53ed689f51dc9d76c007d487aa101 (patch)
tree529a0221076772b74bac4acb54918b1b79bceb75 /ext/http/lib.rs
parent047edf6a75133decf069e6118634caa76a455d7c (diff)
perf(ext/http): Add a sync phase to http serving (#19321)
Under heavy load, we often have requests queued up that don't need an async call to retrieve. We can use a fast path sync op to drain this set of ready requests, and then fall back to the async op once we run out of work. This is a .5-1% bump in req/s on an M2 mac. About 90% of the handlers go through this sync phase (based on a simple instrumentation that is not included in this PR) and skip the async machinery entirely.
Diffstat (limited to 'ext/http/lib.rs')
-rw-r--r--ext/http/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/http/lib.rs b/ext/http/lib.rs
index 7d37c53e1..da007ba39 100644
--- a/ext/http/lib.rs
+++ b/ext/http/lib.rs
@@ -120,6 +120,7 @@ deno_core::extension!(
http_next::op_http_track,
http_next::op_http_upgrade_websocket_next,
http_next::op_http_upgrade_raw,
+ http_next::op_http_try_wait,
http_next::op_http_wait,
],
esm = ["00_serve.js", "01_http.js"],