Repository navigation
Morojs 1.8.16 - #1678
Open
M-Chris wants to merge 3 commits into
Open
Morojs 1.8.16#1678M-Chris wants to merge 3 commits into
M-Chris wants to merge 3 commits into
Conversation
…r only Two more processes of the same file on Moro's HTTP/2 server (Node's http2 module behind the framework's request and response objects): :8443 with ALPN h2 for baseline-h2 and static-h2, :8082 cleartext prior-knowledge h2 for baseline-h2c and json-h2c. The compression middleware moves to the /json route of the plain listener alone, so json-tls stays on the router's fast path. Picks up MoroJS 1.8.15.
… gzip level 3, prepared replies
The entry was losing to the other JS entries on four fronts, none of them the
harness. Each is fixed where it lived - the engine, the framework, or here.
- echo-ws-pipeline (6x behind): the engine answered every WebSocket frame with
its own send(). @morojs/engine 1.1.14 corks the connection for the whole
read, so a pipelined batch leaves in one write; nothing changes here beyond
the version.
- static-tls (10x behind): staticFiles() resolved, stat'ed and read the file
and its sidecars on every request, five to eight threadpool round trips
shared by all 64 worker threads of the process. MoroJS 1.8.16 adds
staticFiles({ cache: true }): files and .br/.gz sidecars read once and
served from memory with their validators, the disk stat'ed again at most
once a second and on directory changes (same-length replacements are
noticed, so the staleness probe passes).
- json-comp (3x) and gateway-64 (2x, its load sends Accept-Encoding): gzip at
the default level 6 per request. The route now asks for gzip level 3
through the middleware's new gzip option, with the encoder reused between
bodies (reuseEncoders); brotli quality 3 stays available for a client that
accepts nothing else. Measured on the json-comp bodies: a little over a
third of the CPU of level 6 for 9% more bytes.
- json-tls, 8gbit, baseline POST (10-30%): the static middleware on the TLS
listener and every request body forced the engine server off its
synchronous dispatch. 1.8.16 runs sync middleware chains and body parsing
on the sync path, so the path check stays cheap; /echo and /baseline2 on
the engine no longer set a Content-Type by hand, so they go out through the
framework's prepared replies.
Also: CERTS_DIR, STATIC_ROOT and WORKERS environment overrides for running
the entry outside the container, the Dockerfile's threadpool note brought up
to date, README and meta description updated.
Local A/B on a 4-worker macOS run, published 1.8.15 against this: pipelined
WebSocket echo 257K -> 971K frames/s, static over plaintext 11.5K -> 49.5K
rps (9.7K -> 33.9K over TLS), /json/50 with gzip 11.8K -> 17.6K rps,
baseline POST +12%.
M-Chris
requested review from
Kaliumhexacyanoferrat and
MDA2AV
as code owners
October 29, 2026 17:20
Contributor
Author
|
/benchmark -f morojs --save |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Contributor
Benchmark ResultsFramework:
Composite score, main against this run, in the board's default view:
The results on main were measured in another session, so a few points up or down can be the machine and not the change. Full log |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR Commands — comment on this PR to trigger (requires collaborator approval):
/benchmark -f <framework>/benchmark -f <framework> -t <test>/benchmark -f <framework> --save/benchmark -f <framework> -t <test> --save/benchmark -f <framework> --compare <other>/benchmark-multiple -f <fw1>,<fw2>,...-tand--savetoo; saved results land in a single commit/benchmark-multiple --save-fneeded: benchmark and save every framework the PR touches/benchmark-test -t <test><test>and save the resultsFor
/benchmark, always specify-f <framework>; the flags combine in any order. Results come back as a comment with a per-profile table of RPS, p99, CPU and memory — one table per framework on multi runs. A new benchmark comment while a run is in flight queues behind it (one deep) instead of cancelling it. For multi-framework PRs (dependency bumps, same-language refactors) prefer/benchmark-multiple, which runs everything in a single job and commits all saved results together, so no run overwrites another.--compareworks on single-framework runs only.What the deltas are measured against. By default, this framework's own results published on
main- answering "did this change help?". When you are tuning a variant or a successor entry,--comparere-bases them on another entry instead:The reply states which baseline it used, and profiles the other framework does not run show
n/arather than a delta.Run benchmarks locally
You can validate and benchmark your framework locally with the lite script — no CPU pinning, fixed connection counts, all load generators run in Docker.
Requirements: Docker Engine on Linux. Load generators (gcannon, h2load, h2load-h3, wrk) are built as self-contained Docker images on first run.