summaryrefslogtreecommitdiff
path: root/ext/http/00_serve.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-06-10 00:45:56 +0200
committerGitHub <noreply@github.com>2023-06-09 22:45:56 +0000
commit848cda619ec5de6e8bd03783c35ef726824be01c (patch)
tree073be3c88694ea7c7eed1f64793759dbc853fe38 /ext/http/00_serve.js
parentf99a849a5f2de9fb1162ab41a566174e3d54612e (diff)
perf: optimize ByteString checks, hoist server rid getter (#19452)
Further improves preact SSR and express benches by about 2k RPS. Ref https://github.com/denoland/deno/issues/19451
Diffstat (limited to 'ext/http/00_serve.js')
-rw-r--r--ext/http/00_serve.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js
index a26c6604e..422ce2fe3 100644
--- a/ext/http/00_serve.js
+++ b/ext/http/00_serve.js
@@ -682,8 +682,8 @@ function serveHttpOn(context, callback) {
// Run the server
const finished = (async () => {
+ const rid = context.serverRid;
while (true) {
- const rid = context.serverRid;
let req;
try {
// Attempt to pull as many requests out of the queue as possible before awaiting. This API is