SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 21 Rust

perf(ext/node): optimize empty node:http response end (#34493)

## Summary
- Adds a guarded fast path for empty `ServerResponse.end()` calls so
ordinary empty node:http responses can write the generated response head
directly.
- Preserves existing framing behavior by falling back for chunked
encoding, trailers, strict content-length cases, status codes without
bodies, and already-sent headers.
- Adds regression coverage for empty response framing to ensure
`Content-Length: 0` is emitted without chunked transfer encoding.


- Used release-lite throughput evidence from `bigboi` artifact
`node-http-empty-end-direct-write-names-20260530T210203Z` (not a debug
build): `node_http_empty_get` improved from 29,893.49 to 33,814.04 req/s
(+13.38% paired mean, 6/6 positive pairs); `node_http_header_20_get`
improved from 17,862.46 to 19,086.87 req/s (+7.05% paired mean, 5/6
positive pairs). Control `deno_serve_empty_get` was within noise at
-1.69% paired mean.

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
N
nathanwhitbot committed
cd67180299905bd54134241ace3c205e91531900
Parent: a1d236c
Committed by GitHub <noreply@github.com> on 6/1/2026, 8:33:16 AM