Age | Commit message (Collapse) | Author |
|
Closes #19470.
|
|
(#19485)
We have a bunch of these to clean up after we changed the API.
|
|
|
|
Further improves preact SSR and express benches by about 2k RPS.
Ref https://github.com/denoland/deno/issues/19451
|
|
|
|
|
|
This commit adds basic support for "node:http2" module. Not
all APIs have been yet implemented, but this change already
allows to use this module for some basic functions.
The "grpc" package is still not working, but it's a good stepping
stone.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
Startup benchmark shows no changes (within 1ms, identical system/user
times).
|
|
|
|
This PR attempts to resolve the first item on the list from
https://github.com/denoland/deno/issues/19330 which is about using a
flat list of interleaved key/value pairs, instead of a nested array of
tuples.
I can tackle some more if you can provide a quick example of using raw
v8 arrays, cc @mmastrac
|
|
For the first implementation of node:http2, we'll use the internal
version of `Deno.serve` which allows us to listen on a raw TCP
connection rather than a listener.
This is mostly a refactoring, and hooking up of `op_http_serve_on` that
was never previously exposed (but designed for this purpose).
|
|
Under heavy load, we often have requests queued up that don't need an
async call to retrieve. We can use a fast path sync op to drain this set
of ready requests, and then fall back to the async op once we run out of
work.
This is a .5-1% bump in req/s on an M2 mac. About 90% of the handlers go
through this sync phase (based on a simple instrumentation that is not
included in this PR) and skip the async machinery entirely.
|
|
Add `ref` and `unref` to return value from `Deno.serve`. Unblocks #3326.
|
|
Necessary for #3326.
Requested in #10214 as well.
|
|
This commit changes the return type of an unstable `Deno.serve()` API
to instead return a `Deno.Server` object that has a `finished` field.
This change is done in preparation to be able to ref/unref the HTTP
server.
|
|
Fixes for various `Attemped to access invalid request` bugs (#19058,
#15427, #17213).
We did not wait for both a drop event and a completion event before
removing items from the slab table. This ensures that we do so.
In addition, the slab methods are refactored out into `slab.rs` for
maintainability.
|
|
Merges `op_http_upgrade_next` and `op_ws_server_create`, significantly
simplifying websocket construction in ext/http (next), and removing one
JS -> Rust call. Also WS server now doesn't bypass
`HttpPropertyExtractor`.
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
Migrates some of existing async ops to generated wrappers introduced in
https://github.com/denoland/deno/pull/18887. As a result "core.opAsync2"
was removed.
I will follow up with more PRs that migrate all the async ops to
generated wrappers.
|
|
I would like to get this change into Deno before merging
https://github.com/denoland/deno_lint/pull/1152
|
|
Performance:
```
async_ops.js: 760k -> 1030k (!)
async_ops_deferred.js: 730k -> 770k
Deno.serve bench: 118k -> 124k
WS test w/ third_party/prebuilt/mac/load_test 100 localhost 8000 0 0: unchanged
Startup time: approx 0.5ms slower (13.7 -> 14.2ms)
```
|
|
Fix internal "upgradeHttpRaw" API restoring capability to upgrade HTTP
connection in polyfilles "node:http" API.
|
|
hello world on macOS:
```
divy@mini ~> wrk -d 10s --latency http://127.0.0.1:4500
Running 10s test @ http://127.0.0.1:4500
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 80.82us 42.95us 2.91ms 96.40%
Req/Sec 56.91k 1.94k 60.77k 95.54%
Latency Distribution
50% 77.00us
75% 89.00us
90% 105.00us
99% 146.00us
1143455 requests in 10.10s, 138.49MB read
Requests/sec: 113212.38
Transfer/sec: 13.71MB
divy@mini ~> wrk -d 10s --latency http://127.0.0.1:4500
Running 10s test @ http://127.0.0.1:4500
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 88.63us 78.77us 2.55ms 98.72%
Req/Sec 54.84k 2.16k 57.35k 98.51%
Latency Distribution
50% 80.00us
75% 93.00us
90% 109.00us
99% 249.00us
1102313 requests in 10.10s, 133.51MB read
Requests/sec: 109136.61
Transfer/sec: 13.22MB
```
Expected to have a larger impact on Linux
|
|
Improve `deno_reactdom_ssr_flash.jsx` by optimizing for zero/one-packet response streams.
|
|
In preparation to stabilization of the API this overload was decided to
be removed.
|
|
2% improvement on macOS hello world.
|
|
requests cannot cause a panic (#18810)
Fix a bug where we weren't saving `slabId` in #18619, plus add some
robustness checks around multiple upgrades (w/test).
|
|
This is a rewrite of the `Deno.serve` API to live on top of hyper
1.0-rc3. The code should be more maintainable long-term, and avoids some
of the slower mpsc patterns that made the older code less efficient than
it could have been.
Missing features:
- `upgradeHttp` and `upgradeHttpRaw` (`upgradeWebSocket` is available,
however).
- Automatic compression is unavailable on responses.
|