Commit 8a0057a
committed
http: add native single-shot response builder
Serialize the common HTTP/1.1 header block (and optional body) in C++ so
_storeHeader and ServerResponse.end avoid repeated JS string
concatenation and multi-write path overhead. The public API and wire
format are unchanged; complex cases fall back to the existing JS path.
On benchmark/http/simple.js (bytes/4/1, 50 connections, 5s) this raised
throughput from ~80k to ~118-126k req/s (~+48% to +58%) on the same
machine.
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>1 parent 8fec65d commit 8a0057a
2 files changed
Lines changed: 1088 additions & 191 deletions
0 commit comments