Bartek Iwańczuk
dcf391ffed
refactor: migrate async ops to generated wrappers ( #18937 )
...
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.
2023-05-01 17:40:00 +02:00
Kenta Moriuchi
6728ad4203
fix(core): Use primordials for methods ( #18839 )
...
I would like to get this change into Deno before merging
https://github.com/denoland/deno_lint/pull/1152
2023-05-01 15:30:02 +02:00
Matt Mastracci
bb1f5e4262
perf(core): async op pseudo-codegen and performance work ( #18887 )
...
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)
```
2023-04-30 08:50:24 +00:00
Matt Mastracci
e2761df3fe
fix(ext/http): internal upgradeHttpRaw works with "Deno.serve()" API ( #18859 )
...
Fix internal "upgradeHttpRaw" API restoring capability to upgrade HTTP
connection in polyfilles "node:http" API.
2023-04-27 00:58:18 +02:00
Divy Srivastava
5f7db93d0b
perf(ext/http): optimize away code based on callback length ( #18849 )
...
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
2023-04-26 22:11:54 +05:30
Matt Mastracci
38681dfa88
perf(ext/http): optimize for zero or one-packet response streams ( #18834 )
...
Improve `deno_reactdom_ssr_flash.jsx` by optimizing for zero/one-packet response streams.
2023-04-26 15:33:30 +02:00
Bartek Iwańczuk
1b450015e7
BREAKING(unstable): remove "Deno.serve(handler, options)" overload ( #18759 )
...
In preparation to stabilization of the API this overload was decided to
be removed.
2023-04-26 14:54:03 +02:00
Divy Srivastava
18170f2326
perf(ext/http): avoid spread arg deopt in op_http_wait ( #18850 )
...
2% improvement on macOS hello world.
2023-04-26 15:37:57 +05:30
Matt Mastracci
13f7f8c415
fix(ext/http): ensure that multiple upgrades and multiple simultaneous 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).
2023-04-23 09:59:46 -06:00
Matt Mastracci
bdffcb409f
feat(ext/http): Rework Deno.serve using hyper 1.0-rc3 ( #18619 )
...
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.
2023-04-22 11:48:21 -06:00