v1.1.1
@morojs/engine 1.1.1
Hot-path performance patch — no API changes, no behavior changes. Every change
removes work the engine was doing on each request:
What changed
- Interned path strings — the binding allocated a fresh V8 string for the
request path on every request. Paths are now interned per server (real apps
route a bounded set of paths), so the string is built once per unique path
instead of once per request — removing the last per-request JS allocation and
its GC pressure. The cache is strictly bounded (≤512 entries, ≤128 bytes per
path; past the cap requests simply build the string per call), so unique-URL
floods can't grow it. - Responses build directly into the cork buffer on the pipelined plaintext
path — previously each response was built in a scratch buffer and then copied
into the batch; that full-frame memcpy per response is gone. (TLS responses
keep the encrypt-then-cork path.) - Request registry pre-sized — the per-request id map no longer rehashes or
chains on the hot path (pre-reserved, 0.5 max load factor).
Verification
- Full wire-test matrix green: HTTP conformance + edge + hardening +
regression, WebSocket, limits, TLS + TLS-hardening, permessage-deflate. - 234 MoroJS integration tests green against this build.
- Measured comparisons live in the
MoroJS Benchmark repo.
Drop-in for 1.1.x. Same platform/ABI matrix (macOS arm64/x64, Linux glibc
x64/arm64, Linux musl x64, Windows x64 × Node 20–26), prebuilt with npm
provenance.