Marcos Casagrande
e1aa514179
perf(ext/event): replace ReflectHas with object lookup ( #20190 )
...
This PR optimizes event dispatch by replacing `ReflectHas` with object
lookup. I also made `isSlottable` return `false` since AFAIK there
aren't any slottables nodes in Deno
**This PR**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
--------------------------------------------------------------------- -----------------------------
event dispatch 80.46 ns/iter 12,428,739.4 (73.84 ns … 120.07 ns) 81.82 ns 86.34 ns 91.18 ns
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
--------------------------------------------------------------------- -----------------------------
event dispatch 102.66 ns/iter 9,741,319.6 (96.66 ns … 132.88 ns) 104.18 ns 114.58 ns 118.45 ns
```
```js
const tg = new EventTarget();
const ev = new Event("foo");
const listener = () => {};
tg.addEventListener("foo", listener);
Deno.bench("event dispatch ", () => {
tg.dispatchEvent(ev);
});
```
towards https://github.com/denoland/deno/issues/20167
2023-08-18 14:44:57 +02:00
Bartek Iwańczuk
a48ec1d563
fix(node/http): emit error when addr in use ( #20200 )
...
Closes https://github.com/denoland/deno/issues/20186
2023-08-18 13:48:18 +02:00
Heyang Zhou
c77c836a23
feat(ext/kv): key expiration ( #20091 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-08-18 17:34:16 +08:00
David Sherret
4535f79a4a
fix(npm): do not panic providing file url to require.resolve paths ( #20182 )
...
Closes #19922
2023-08-17 10:39:06 -04:00
Matt Mastracci
23ff0e722e
feat(ext/web): resourceForReadableStream ( #20180 )
...
Extracted from fast streams work.
This is a resource wrapper for `ReadableStream`, allowing us to treat
all `ReadableStream` instances as resources, and remove special paths in
both `fetch` and `serve`.
Performance with a ReadableStream response yields ~18% improvement:
```
return new Response(new ReadableStream({
start(controller) {
controller.enqueue(new Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]));
controller.close();
}
})
```
This patch:
```
12:36 $ third_party/prebuilt/mac/wrk http://localhost:8080
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 99.96us 100.03us 6.65ms 98.84%
Req/Sec 47.73k 2.43k 51.02k 89.11%
959308 requests in 10.10s, 117.10MB read
Requests/sec: 94978.71
Transfer/sec: 11.59MB
```
main:
```
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 163.03us 685.51us 19.73ms 99.27%
Req/Sec 39.50k 3.98k 66.11k 95.52%
789582 requests in 10.10s, 82.83MB read
Requests/sec: 78182.65
Transfer/sec: 8.20MB
```
2023-08-17 07:52:37 -06:00
Heyang Zhou
0960e895da
fix(ext/kv): retry transaction on SQLITE_BUSY
errors ( #20189 )
...
Properly handle the `SQLITE_BUSY` error code by retrying the
transaction.
Also wraps database initialization logic in a transaction to protect
against incomplete/concurrent initializations.
Fixes https://github.com/denoland/deno/issues/20116 .
2023-08-17 18:53:55 +08:00
Marcos Casagrande
ec63b36994
perf(ext/event): optimize Event constructor ( #20181 )
...
This PR optimizes `Event` constructor
- ~Added a fast path for empty `eventInitDict`~ Removed `EventInit`
dictionary converter
- Don't make `isTrusted` a
[LegacyUnforgeable](https://webidl.spec.whatwg.org/#LegacyUnforgeable )
property. Doing so makes it non-spec compliant but calling
`Object/Reflect.defineProperty` on the constructor is a big bottleneck.
Node did the same a few months ago
https://github.com/nodejs/node/pull/46974 . In my opinion, the
performance gains are worth deviating from the spec for a
browser-related property.
**This PR**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
------------------------------------------------------------------------------- -----------------------------
event constructor no init 36.69 ns/iter 27,257,504.6 (33.36 ns … 42.45 ns) 37.71 ns 39.61 ns 40.07 ns
event constructor 36.7 ns/iter 27,246,776.6 (33.35 ns … 56.03 ns) 37.73 ns 40.14 ns 41.74 ns
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
------------------------------------------------------------------------------- -----------------------------
event constructor no init 380.48 ns/iter 2,628,275.8 (366.66 ns … 399.39 ns) 384.58 ns 398.27 ns 399.39 ns
event constructor 480.33 ns/iter 2,081,882.6 (466.67 ns … 503.47 ns) 484.27 ns 501.28 ns 503.47 ns
```
```js
Deno.bench("event constructor no init", () => {
const event = new Event("foo");
});
Deno.bench("event constructor", () => {
const event = new Event("foo", { bubbles: true, cancelable: false });
});
```
towards https://github.com/denoland/deno/issues/20167
2023-08-17 10:35:18 +02:00
Leo Kettmeir
1b0e394d48
fix: release ReadeableStream in fetch ( #17365 )
...
Fixes #16648
---------
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-08-16 14:02:15 +02:00
Marcos Casagrande
838140fb82
perf(ext/urlpattern): optimize URLPattern.exec ( #20170 )
...
This PR optimizes `URLPattern.exec`
- Use component keys from constructor instead of calling it on every
`.exec`. AFAIK keys should always be
`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`.
Haven't looked much into it but I think it's safe to define these
outside the constructor as well.
- Add a fast path for `/^$/u` (default regexp) and empty input
- Replaced `ArrayPrototypeMap` & `ObjectFromEntries` with a `for` loop.
**this PR**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
--------------------------------------------------------------- -----------------------------
exec 1 2.17 µs/iter 461,022.8 (2.14 µs … 2.27 µs) 2.18 µs 2.27 µs 2.27 µs
exec 2 4.13 µs/iter 242,173.4 (4.08 µs … 4.27 µs) 4.15 µs 4.27 µs 4.27 µs
exec 3 2.55 µs/iter 391,508.1 (2.53 µs … 2.68 µs) 2.56 µs 2.68 µs 2.68 µs
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
--------------------------------------------------------------- -----------------------------
exec 1 2.45 µs/iter 408,092.4 (2.41 µs … 2.55 µs) 2.46 µs 2.55 µs 2.55 µs
exec 2 4.41 µs/iter 226,706.0 (3.49 µs … 399.56 µs) 4.39 µs 5.49 µs 6.07 µs
exec 3 2.99 µs/iter 334,833.4 (2.94 µs … 3.21 µs) 2.99 µs 3.21 µs 3.21 µs
```
2023-08-16 12:58:03 +02:00
Evan
79d1445796
fix(ext/node): allow for the reassignment of userInfo() on Windows ( #20165 )
...
The goal of this PR is to address issue #20106 where a `TypeError`
occurs when the variables `uid` and `gid` from `userInfo()` in `node:os`
are reassigned if the user is on Windows. Both `uid` and `gid` are
marked as `const` therefore producing a `TypeError` when the two are
reassigned.
This PR achieves that goal by marking `uid` and `gid` as `let`
2023-08-16 11:28:49 +02:00
Matt Mastracci
4380a09a05
feat(ext/node): eagerly bootstrap node ( #20153 )
...
To fix bugs around detection of when node emulation is required, we will
just eagerly initialize it. The improvements we make to reduce the
impact of the startup time:
- [x] Process stdin/stdout/stderr are lazily created
- [x] node.js global proxy no longer allocates on each access check
- [x] Process checks for `beforeExit` listeners before doing expensive
shutdown work
- [x] Process should avoid adding global event handlers until listeners
are added
Benchmarking this PR (`89de7e1ff`) vs main (`41cad2179`)
```
12:36 $ third_party/prebuilt/mac/hyperfine --warmup 100 -S none './deno-41cad2179 run ./empty.js' './deno-89de7e1ff run ./empty.js'
Benchmark 1: ./deno-41cad2179 run ./empty.js
Time (mean ± σ): 24.3 ms ± 1.6 ms [User: 16.2 ms, System: 6.0 ms]
Range (min … max): 21.1 ms … 29.1 ms 115 runs
Benchmark 2: ./deno-89de7e1ff run ./empty.js
Time (mean ± σ): 24.0 ms ± 1.4 ms [User: 16.3 ms, System: 5.6 ms]
Range (min … max): 21.3 ms … 28.6 ms 126 runs
```
Fixes https://github.com/denoland/deno/issues/20142
Fixes https://github.com/denoland/deno/issues/15826
Fixes https://github.com/denoland/deno/issues/20028
2023-08-16 04:36:36 +09:00
Marcos Casagrande
ddbb5fdfb0
perf(ext/node): optimize http headers ( #20163 )
...
This PR optimizes Node's `IncomingMessageForServer.headers` by replacing
`Object.fromEntries()` with a loop and `headers.entries` with
`headersEntries` which returns the internal array directly instead of an
iterator
## Benchmarks
Using `wrk` with 5 headers
```
wrk -d 10s --latency -H "X-Deno: true" -H "Accept: application/json" -H "X-Foo: bar" -H "User-Agent: wrk" -H "Accept-Encoding: gzip, br" http://127.0.0.1:3000
```
**this PR**
```
Running 10s test @ http://127.0.0.1:3000
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 167.53us 136.89us 2.75ms 97.33%
Req/Sec 31.98k 1.38k 36.39k 70.30%
Latency Distribution
50% 134.00us
75% 191.00us
90% 234.00us
99% 544.00us
642548 requests in 10.10s, 45.96MB read
Requests/sec: 63620.36
Transfer/sec: 4.55MB
```
**main**
```
Running 10s test @ http://127.0.0.1:3000
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 181.31us 132.54us 3.79ms 97.13%
Req/Sec 29.21k 1.45k 32.93k 79.21%
Latency Distribution
50% 148.00us
75% 198.00us
90% 261.00us
99% 545.00us
586939 requests in 10.10s, 41.98MB read
Requests/sec: 58114.01
Transfer/sec: 4.16MB
```
```js
import express from "npm:express";
const app = express();
app.get("/", function (req, res) {
req.headers;
res.end();
});
app.listen(3000);
```
2023-08-15 16:59:35 +02:00
Marcos Casagrande
0fc31d9d65
fix(ext/fetch): clone second branch chunks in Body.clone() ( #20057 )
...
This PR makes `Body.clone()` spec compliant:
https://fetch.spec.whatwg.org/#concept-body-clone
> 1, Let « out1, out2 » be the result of
[teeing](https://streams.spec.whatwg.org/#readablestream-tee ) body’s
[stream](https://fetch.spec.whatwg.org/#concept-body-stream ).
> ...
> To tee a
[ReadableStream](https://streams.spec.whatwg.org/#readablestream )
stream, return ?
[ReadableStreamTee](https://streams.spec.whatwg.org/#readable-stream-tee )(stream,
true).
---
Closes #10994
2023-08-15 09:21:02 +02:00
Bartek Iwańczuk
119526a7a5
fix(require): use canonicalized path for loading content ( #20133 )
2023-08-15 09:10:54 +02:00
Evan
ece2a3de5b
fix(ext/net): implement a graceful error on an invalid SSL certificate ( #20157 )
...
The goal of this PR is to address issue #19520 where Deno panics when
encountering an invalid SSL certificate.
This PR achieves that goal by removing an `.expect()` statement and
implementing a match statement on `tsl_config` (found in
[/ext/net/ops_tsl.rs](e071382768/ext/net/ops_tls.rs (L1058)
))
to check whether the desired configuration is valid
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-08-15 00:11:12 +00:00
Marcos Casagrande
625bd39050
perf(ext/headers): optimize headers iterable ( #20155 )
...
This PR makes more optimizations to headers iterable by removing
`ObjectEntries` which was consistently prominent in the flame graph when
benchmarking an express server.
**this PR**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
------------------------------------------------------------------ -----------------------------
headers iter 9.6 µs/iter 104,134.1 (8.74 µs … 131.31 µs) 9.47 µs 12.61 µs 17.81 µs
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
------------------------------------------------------------------ -----------------------------
headers iter 12.87 µs/iter 77,675.9 (11.97 µs … 132.34 µs) 12.76 µs 16.49 µs 26.4 µs
```
```js
const headers = new Headers({
"Content-Type": "application/json",
"X-Content-Type": "application/json",
"Date": "Thu, 14 Aug 2023 17:45:10 GMT",
"X-Deno": "Deno",
"Powered-By": "Deno",
"Content-Encoding": "gzip",
"Set-Cookie": "__Secure-ID=123; Secure; Domain=example.com",
"Content-Length": "150",
"Vary": "Accept-Encoding, Accept, X-Requested-With",
});
Deno.bench('headers iter', () => {
[...headers]
})
```
2023-08-14 19:13:55 +00:00
Marcos Casagrande
e071382768
perf(ext/node): cache IncomingMessageForServer.headers
( #20147 )
...
This PR adds caching to node's `req.headers`
```js
import express from "npm:express";
const app = express();
app.get("/", function (req, res) {
const ua = req.header("User-Agent");
const auth = req.header("Authorization");
const type = req.header("Content-Type");
const ip = req.header("X-Forwarded-For");
res.end();
});
app.listen(3000);
```
**this PR**
```
wrk -d 10s --latency http://127.0.0.1:3000
Running 10s test @ http://127.0.0.1:3000
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 155.64us 152.14us 5.74ms 97.39%
Req/Sec 35.00k 1.97k 39.10k 80.69%
Latency Distribution
50% 123.00us
75% 172.00us
90% 214.00us
99% 563.00us
703420 requests in 10.10s, 50.31MB read
Requests/sec: 69648.45
Transfer/sec: 4.98MB
```
**main**
```
wrk -d 10s --latency http://127.0.0.1:3000
Running 10s test @ http://127.0.0.1:3000
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 217.95us 786.89us 26.26ms 98.23%
Req/Sec 32.32k 2.54k 37.19k 87.13%
Latency Distribution
50% 130.00us
75% 191.00us
90% 232.00us
99% 1.88ms
649411 requests in 10.10s, 46.45MB read
Requests/sec: 64300.44
Transfer/sec: 4.60MB
```
2023-08-14 15:14:02 +02:00
Matt Mastracci
babfba14ef
chore: deno_core -> 0.201.0 ( #20135 )
2023-08-12 19:04:45 +00:00
Marcos Casagrande
050ca39409
perf(ext/request): optimize validate and normalize HTTP method ( #20143 )
...
This PR optimizes `Request` constructor init method step. It doubles the
speed for known lowercased methods. I also added `PATCH` to known
methods
**this patch**
```
benchmark time (avg) iter/s (min … max) p75 p99 p995
---------------------------------------------------------------------------- -----------------------------
method: GET 1.49 µs/iter 669,336.9 (1.35 µs … 2.02 µs) 1.54 µs 2.02 µs 2.02 µs
method: PATCH 1.85 µs/iter 540,921.5 (1.65 µs … 2.02 µs) 1.91 µs 2.02 µs 2.02 µs
method: get 1.49 µs/iter 669,067.9 (1.28 µs … 1.69 µs) 1.55 µs 1.69 µs 1.69 µs
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
---------------------------------------------------------------------------- -----------------------------
method: GET 1.5 µs/iter 665,232.3 (1.3 µs … 2.02 µs) 1.54 µs 2.02 µs 2.02 µs
method: PATCH 2.47 µs/iter 404,052.7 (2.06 µs … 4.05 µs) 2.51 µs 4.05 µs 4.05 µs
method: get 3 µs/iter 333,277.2 (2.72 µs … 4.04 µs) 3.05 µs 4.04 µs 4.04 µs
```
```js
Deno.bench("method: GET", () => {
const r = new Request("https://deno.land ", {
method: "GET",
});
});
Deno.bench("method: PATCH", () => {
const r = new Request("https://deno.land ", {
method: "PATCH",
body: '{"foo": "bar"}',
});
});
Deno.bench("method: get", () => {
const r = new Request("https://deno.land ", {
method: "get",
});
});
```
2023-08-12 12:29:00 -06:00
Marcos Casagrande
b34bd640a6
perf(ext/headers): use regex.test instead of .exec ( #20125 )
...
This PR improves the performance of `Headers.get` by using `Regex.test`
instead of `.exec`. Also replaced the `Map` used for caching with an
object which is a bit faster
**This patch**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------------- -----------------------------
Headers.get 124.71 ns/iter 8,018,687.3 (115.11 ns … 265.66 ns) 126.05 ns 136.12 ns 142.37 ns
```
**1.36.1**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.0 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------------- -----------------------------
Headers.get 218.91 ns/iter 4,568,172.3 (165.37 ns … 264.44 ns) 241.62 ns 260.94 ns 262.67 ns
```
```js
const headers = new Headers({
"Content-Type": "application/json",
"Date": "Thu, 10 Aug 2023 07:45:10 GMT",
"X-Deno": "Deno",
"Powered-By": "Deno",
"Content-Encoding": "gzip",
"Set-Cookie": "__Secure-ID=123; Secure; Domain=example.com",
"Content-Length": "150",
"Vary": "Accept-Encoding, Accept, X-Requested-With",
});
Deno.bench("Headers.get", () => {
headers.get("x-deno");
});
```
2023-08-12 10:42:23 -06:00
Marcos Casagrande
f843a1fdff
perf(ext/headers): cache iterableHeaders for immutable Headers ( #20132 )
...
This PR caches `_iterableHeaders` for immutable `Headers` increasing the
performance of `fetch` & server if headers are iterated.
Should close #19466
I only cached immutable headers to address this comment
https://github.com/denoland/deno/issues/19466#issuecomment-1589892373
since I didn't find any occurrence of header mutation on immutable
headers. We can discuss caching for non-immutable, but I think this is a
great first step.
## BENCHMARK
### Server
```js
const addr = Deno.args[0] ?? "127.0.0.1:4500";
const [hostname, port] = addr.split(":");
const { serve } = Deno;
serve({ hostname, port: Number(port), reusePort: true }, (req) => {
const headers = [...req.headers]; // req.headers are immutable, cannot set/append/delete
return new Response("ok");
});
```
Used `wrk` with 5 headers
```
wrk -d 10s --latency -H "X-Deno: true" -H "Accept: application/json" -H "X-Foo: bar" -H "User-Agent: wrk" -H "Accept-Encoding: gzip, br" http://127.0.0.1:4500
```
**This patch**
```
Running 10s test @ http://127.0.0.1:4500
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 70.18us 22.89us 679.00us 81.37%
Req/Sec 71.55k 9.69k 82.18k 89.60%
Latency Distribution
50% 59.00us
75% 89.00us
90% 98.00us
99% 159.00us
1437891 requests in 10.10s, 193.35MB read
Requests/sec: 142369.83
Transfer/sec: 19.14MB
```
**main**
```
Running 10s test @ http://127.0.0.1:4500
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 112.78us 36.47us 2.09ms 77.99%
Req/Sec 44.30k 1.65k 49.14k 74.26%
Latency Distribution
50% 99.00us
75% 136.00us
90% 162.00us
99% 213.00us
890588 requests in 10.10s, 118.91MB read
Requests/sec: 88176.37
Transfer/sec: 11.77MB
```
### fetch
```js
const res = await fetch('http://127.0.0.1:4500 ');
Deno.bench("Headers iterator", () => {
const i = [...res.headers]; // res.headers are immutable, cannot set/append/delete
});
```
**this patch**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
---------------------------------------------------------------------- -----------------------------
Headers iterator 329.5 ns/iter 3,034,909.0 (318.55 ns … 364.34 ns) 331.1 ns 355.72 ns 364.34 ns
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
---------------------------------------------------------------------- -----------------------------
Headers iterator 2.59 µs/iter 386,372.1 (2.56 µs … 2.68 µs) 2.59 µs 2.68 µs 2.68 µs
```
2023-08-12 10:42:06 -06:00
Marcos Casagrande
396498bf9e
perf(ext/request): optimize Request constructor ( #20141 )
...
This PR optimizes `Request` constructor when `init` is not empty. This
path is also used by `fetch` when `options` argument is used
```js
fetch("https://deno.land ", {
method: "POST",
body: 'land'
});
```
- Removed 3 extra calls to `headerListFromHeaders`
- Avoid `Object.keys` & `headerList` clone if `init.headers` is set
- Only empty `headersList` (`.splice`) if it's not already empty.
## Benchmarks
**this patch**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------------------- -----------------------------
Request without headers 1.86 µs/iter 536,440.7 (1.67 µs … 2.76 µs) 1.89 µs 2.76 µs 2.76 µs
Request with headers 1.96 µs/iter 509,440.5 (1.83 µs … 2.17 µs) 1.99 µs 2.17 µs 2.17 µs
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------------------- -----------------------------
Request without headers 1.96 µs/iter 510,201.5 (1.81 µs … 2.64 µs) 2 µs 2.64 µs 2.64 µs
Request with headers 2.03 µs/iter 493,526.6 (1.84 µs … 2.31 µs) 2.08 µs 2.31 µs 2.31 µs
```
```js
Deno.bench("Request without headers", () => {
const r = new Request("https://deno.land ", {
method: "POST",
body: '{"foo": "bar"}',
});
});
Deno.bench("Request with headers", () => {
const r = new Request("https://deno.land ", {
method: "POST",
body: '{"foo": "bar"}',
headers: {
"Content-Type": "application/json",
},
});
});
```
2023-08-12 10:41:07 -06:00
Divy Srivastava
33dc5d2622
fix(node): implement TLSSocket._start ( #20120 )
...
Closes https://github.com/denoland/deno/issues/19983
Closes https://github.com/denoland/deno/issues/18303
Closes https://github.com/denoland/deno/issues/16681
Closes https://github.com/denoland/deno/issues/19978
2023-08-11 11:57:41 +00:00
Divy Srivastava
2f00b0add4
fix(ext/node): support dictionary option in zlib init ( #20035 )
...
Fixes https://github.com/denoland/deno/issues/19540
2023-08-11 11:42:35 +00:00
Divy Srivastava
65db8814c3
fix(node): object keys in publicEncrypt ( #20128 )
...
Fixes https://github.com/denoland/deno/issues/19935
2023-08-11 07:34:23 +00:00
Bartek Iwańczuk
634f5ccd49
perf(http): use Cow<[u8]> for setting header ( #20112 )
2023-08-10 15:35:01 -06:00
Bartek Iwańczuk
69387f0b0c
fix(node): don't print warning on process.dlopen.flags ( #20124 )
...
Closes https://github.com/denoland/deno/issues/20075
2023-08-10 20:19:20 +02:00
Marcos Casagrande
6b1a976181
perf(ext/http): use ServeHandlerInfo class instead of object literal ( #20122 )
...
This PR improves performance of `Deno.Serve` when providing `info`
argument by creating `ServeHandlerInfo` class instead of creating an
object literal with a getter on every request.
```js
Deno.serve((_req, info) => new Response(info.remoteAddr.transport) });
```
### Benchmarks
```
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 42.34us 16.30us 1.66ms 95.88%
Req/Sec 118.17k 2.95k 127.38k 76.73%
Latency Distribution
50% 38.00us
75% 41.00us
90% 56.00us
99% 83.00us
2375298 requests in 10.10s, 319.40MB read
Requests/sec: 235177.04
Transfer/sec: 31.62MB
```
**main**
```
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 78.86us 211.06us 3.58ms 96.52%
Req/Sec 105.90k 4.35k 117.41k 78.22%
Latency Distribution
50% 41.00us
75% 53.00us
90% 62.00us
99% 1.18ms
2127534 requests in 10.10s, 286.09MB read
Requests/sec: 210647.49
Transfer/sec: 28.33MB
```
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.0 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
-------------------------------------------------------------------------- -----------------------------
new ServeHandlerInfo 3.43 ns/iter 291,508,889.3 (3.07 ns … 12.21 ns) 3.42 ns 3.84 ns 3.87 ns
{} with getter 133.84 ns/iter 7,471,528.9 (92.9 ns … 458.95 ns) 132.45 ns 364.96 ns 429.43 ns
```
----
### Drawbacks:
`.remoteAddr` is now not enumerable
```
ServeHandlerInfo {}
```
vs
```
{ remoteAddr: [Getter] }
```
It'll break any code trying to iterate through `info` keys (Doubt
there's anyone doing it though)
```js
Deno.serve((req, info) => {
console.log(Object.keys(info).length === 0) // true;
return new Response("yes");
});
2023-08-10 19:45:55 +02:00
Marcos Casagrande
2d3d0a579d
perf(ext/headers): optimize getHeader using for loop ( #20115 )
...
This PR optimizes the `getHeader` function by replacing `.filter` and
`.map` with a `for` loop
**this patch**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.0 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------- -----------------------------
Headers.get 132.2 ns/iter 7,564,093.4 (125.81 ns … 147.66 ns) 133.79 ns 144.92 ns 145.36 ns
```
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.0 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------- -----------------------------
Headers.get 191.48 ns/iter 5,222,523.6 (182.75 ns … 212.22 ns) 193.5 ns 205.96 ns 211.51 ns
```
```js
const headers = new Headers({
"Content-Type": "application/json",
"Date": "Thu, 10 Aug 2023 07:45:10 GMT",
"X-Deno": "Deno",
"Powered-By": "Deno",
"Content-Encoding": "gzip",
"Set-Cookie": "__Secure-ID=123; Secure; Domain=example.com",
"Content-Length": "150",
"Vary": "Accept-Encoding, Accept, X-Requested-With",
});
Deno.bench("Headers.get", () => {
const i = headers.get("x-deno");
});
```
2023-08-10 19:41:09 +02:00
Divy Srivastava
94d664535b
chore: forward v1.36.1 to main ( #20119 )
...
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-08-10 16:44:41 +03:00
Divy Srivastava
91dc6fa5f1
chore: upgrade fastwebsockets to 0.4.4 ( #19089 )
...
Fixes https://github.com/denoland/deno/issues/19041
2023-08-10 09:59:06 +05:30
Bartek Iwańczuk
8f854782b1
fix(ext/timers): some timers are not resolved ( #20055 )
...
Fixes https://github.com/denoland/deno/issues/19866
2023-08-10 04:01:35 +00:00
Bartek Iwańczuk
2507d6fa10
fix(node/async_hooks): don't pop async context frame if stack if empty ( #20077 )
...
Closes https://github.com/denoland/deno/issues/20076
2023-08-10 09:00:25 +05:30
Marcos Casagrande
414274b68a
perf(ext/headers): use .push loop instead of spread operator ( #20108 )
2023-08-09 19:36:47 -04:00
Matt Mastracci
2ed85c7dd6
refactor(ext/cache): Remove custom shutdown and use fast async ops ( #20107 )
...
The original implementation of `Cache` used a custom `shutdown` method
on the resource, but to simplify fast streams work we're going to move
this to an op of its own.
While we're in here, we're going to replace `opAsync` with
`ensureFastOps`. `op2` work will have to wait because of some
limitations to our async support, however.
2023-08-09 17:45:35 +00:00
Matt Mastracci
ddfcf1add4
refactor(ext/fetch): Remove FetchRequestBodyResource from FetchHandler interface ( #20100 )
...
This is unused and will allow us to remove `FetchRequestBodyResource` in
a future PR.
2023-08-09 10:47:47 -06:00
Luca Casonato
03e963f578
chore: rename some helpers on the Fs trait ( #20097 )
...
Rename some of the helper methods on the Fs trait to be suffixed with
`_sync` / `_async`, in preparation of the introduction of more async
methods for some helpers.
Also adds a `read_text_file_async` helper to complement the renamed
`read_text_file_sync` helper.
2023-08-08 16:28:18 -04:00
David Sherret
a037ed77a2
fix(fmt): do not insert expr stmt leading semi-colon in do while stmt body ( #20093 )
...
This is for when semiColons: false
Closes #20089
2023-08-08 09:15:19 -04:00
Marcos Casagrande
557b11b765
fix(ext/abort): trigger AbortSignal events in correct order ( #20095 )
...
This PR ensures that the original signal event is fired before any
dependent signal events.
---
The enabled tests fail on `main`:
```
assert_array_equals: Abort events fired in correct order expected property 0 to be
"original-aborted" but got "clone-aborted" (expected array ["original-aborted", "clone-aborted"]
got ["clone-aborted", "original-aborted"])
```
2023-08-08 12:05:42 +02:00
Nayeem Rahman
c1c8eb3d55
build: allow disabling snapshots for dev ( #20048 )
...
Closes #19399 (running without snapshots at all was suggested as an
alternative solution).
Adds a `__runtime_js_sources` pseudo-private feature to load extension
JS sources at runtime for faster development, instead of building and
loading snapshots or embedding sources in the binary. Will only work in
a development environment obviously.
Try running `cargo test --features __runtime_js_sources
integration::node_unit_tests::os_test`. Then break some behaviour in
`ext/node/polyfills/os.ts` e.g. make `function cpus() {}` return an
empty array, and run it again. Fix and then run again. No more build
time in between.
2023-08-06 01:47:15 +02:00
Matt Mastracci
8ae7062931
fix(ext/http): serveHttp brotli compression level should be fastest ( #20058 )
...
Use brotli's fastest mode rather than default mode
2023-08-04 12:39:39 -06:00
Luca Bruno
72d9f06090
chore(cargo): update async-compression/flate2/miniz to latest ( #20049 )
...
This bumps `async-compression` dependency in `deno_http` to latest, in
order to avoid having multiple duplicate versions.
Related, it also unpin a stale `flate2` dependency so that the whole
chain of `async-compression` -> `flate2` -> `miniz_oxide` can surface up
to current versions.
The lockfile entries for all of the above crates have been update
accordingly; the new tree of dependencies looks like this:
```
$ cargo tree -i -p miniz_oxide
miniz_oxide v0.7.1
└── flate2 v1.0.26
└── async-compression v0.4.1
```
2023-08-04 18:30:14 +02:00
Luca Bruno
5abf4cd951
fix(ext/http): unify default gzip compression level ( #20050 )
...
This tweaks the HTTP response-writer in order to align the two possible
execution flows into using the same gzip default compression level, that
is `1` (otherwise the implicit default level is `6`).
2023-08-04 17:28:32 +02:00
Bartek Iwańczuk
6405b5f454
fix(node): polyfill process.title ( #20044 )
...
Closes https://github.com/denoland/deno/issues/19777
2023-08-04 14:31:13 +02:00
Bartek Iwańczuk
8d8a89ceea
fix(node): repl._builtinLibs ( #20046 )
...
Ref https://github.com/denoland/deno/issues/19733
2023-08-04 14:30:48 +02:00
Marcos Casagrande
5311f69bbb
fix(ext/file): resolve unresolved Promise in Blob.stream ( #20039 )
...
This PR fixes some crashing WPT tests due to an unresolved promise.
---
This could be a [stream spec](https://streams.spec.whatwg.org ) bug
When `controller.close` is called on a byob stream, there's no cleanup
of pending `readIntoRequests`. The only cleanup of pending
`readIntoRequests` happen when `.byobRequest.respond(0)` is called, it
happens
here:6ba245fe25/ext/web/06_streams.js (L2026)
which ends up calling `readIntoRequest.closeSteps(chunk);` in
6ba245fe25/ext/web/06_streams.js (L2070)
To reproduce:
```js
async function byobRead() {
const input = [new Uint8Array([8, 241, 48, 123, 151])];
const stream = new ReadableStream({
type: "bytes",
async pull(controller) {
if(input.length === 0) {
controller.close();
// controller.byobRequest.respond(0); // uncomment for fix
return
}
controller.enqueue(input.shift())
},
});
const reader = stream.getReader({ mode: 'byob' });
const r1 = await reader.read(new Uint8Array(64));
console.log(r1);
const r2 = await reader.read(new Uint8Array(64));
console.log(r2);
}
await byobRead();
```
Running the script triggers:
```
error: Top-level await promise never resolved
```
2023-08-04 13:57:54 +02:00
Bartek Iwańczuk
433ecc9047
refactor: rewrite http_next ops to use op2 macro ( #19934 )
...
Ref #19915
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-08-03 20:36:32 +00:00
Matt Mastracci
7f8bf2537d
refactor(ext/fetch): refactor fetch to use new write_error method ( #20029 )
...
This is a prerequisite for fast streams work -- this particular resource
used a custom `mpsc`-style stream, and this work will allow us to unify
it with the streams in `ext/http` in time.
Instead of using Option as an internal semaphore for "correctly
completed EOF", we allow code to propagate errors into the channel which
can be picked up by downstream sinks like Hyper. EOF is signalled using
a more standard sender drop.
2023-08-03 14:27:25 -06:00
denobot
6ba245fe25
1.36.0 ( #20036 )
...
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-08-03 18:26:25 +02:00
Asher Gomez
6fb7e8d93b
feat(permissions): add "--deny-*" flags ( #19070 )
...
This commit adds new "--deny-*" permission flags. These are complimentary to
"--allow-*" flags.
These flags can be used to restrict access to certain resources, even if they
were granted using "--allow-*" flags or the "--allow-all" ("-A") flag.
Eg. specifying "--allow-read --deny-read" will result in a permission error,
while "--allow-read --deny-read=/etc" will allow read access to all FS but the
"/etc" directory.
Runtime permissions APIs ("Deno.permissions") were adjusted as well, mainly
by adding, a new "PermissionStatus.partial" field. This field denotes that
while permission might be granted to requested resource, it's only partial (ie.
a "--deny-*" flag was specified that excludes some of the requested resources).
Eg. specifying "--allow-read=foo/ --deny-read=foo/bar" and then querying for
permissions like "Deno.permissions.query({ name: "read", path: "foo/" })"
will return "PermissionStatus { state: "granted", onchange: null, partial: true }",
denoting that some of the subpaths don't have read access.
Closes #18804 .
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-08-03 13:19:19 +02:00
Bartek Iwańczuk
d9c85e016f
fix(node): node:test reports correct location ( #20025 )
...
Also removed some noisy output that caused test flakiness.
2023-08-02 17:11:04 +02:00
await-ovo
fec34d8069
fix(ext/node): fix import json using npm specifier ( #19723 )
2023-08-01 23:20:08 +00:00
Bartek Iwańczuk
21f1b2f62b
feat(node): add polyfill for node:test module ( #20002 )
...
This commit provides basic polyfill for "node:test" module. Currently
only top-level "test" function is polyfilled, all remaining functions from
that module throw not implemented errors.
2023-08-02 01:17:38 +02:00
David Sherret
5e89d1a0ab
ci: lint on all operating systems ( #20012 )
2023-08-01 16:08:41 -04:00
Matt Mastracci
45572e329a
refactor(runtime): use new fd methods from resource table ( #20010 )
...
Prereq for fast streams work. No longer need `#[cfg]` around
`backing_fd`.
2023-08-01 14:48:39 -04:00
Ricardo Iván Vieitez Parra
98403691d1
fix: call setIsTrusted for generated events (MessageEvent) ( #19919 )
...
This addresses issue #19918 .
## Issue description
Event messages have the wrong isTrusted value when they are not
triggered by user interaction, which differs from the browser. In
particular, all MessageEvents created by Deno have isTrusted set to
false, even though it should be true.
This is my first ever contribution to Deno, so I might be missing
something.
2023-07-31 23:22:07 +02:00
Leo Kettmeir
aa8078b688
feat(node/os): implement getPriority, setPriority & userInfo ( #19370 )
...
Takes #4202 over
Closes #17850
---------
Co-authored-by: ecyrbe <ecyrbe@gmail.com>
2023-07-31 22:29:09 +02:00
Luca Casonato
78ceeec6be
perf: faster node globals access in cjs ( #19997 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-31 19:45:32 +00:00
Nayeem Rahman
d5efdeeff1
refactor: update core extension api usage ( #19952 )
2023-07-31 18:19:15 +00:00
David Sherret
99daad0541
refactor: NodeCodeTranslator - optional source to translate_cjs_to_esm ( #20000 )
2023-07-31 17:46:58 +00:00
Matt Mastracci
990ecc99d8
feat(ext/http): Upgrade to hyper1.0-rc4 ( #19987 )
...
Includes a lightly-modified version of hyper-util's `TokioIo` utility.
Hyper changes:
v1.0.0-rc.4 (2023-07-10)
Bug Fixes
http1:
http1 server graceful shutdown fix (#3261 )
([f4b51300](f4b513009d
))
send error on Incoming body when connection errors (#3256 )
([52f19259](52f192593f
),
closes https://github.com/hyperium/hyper/issues/3253 )
properly end chunked bodies when it was known to be empty (#3254 )
([fec64cf0](fec64cf0ab
),
closes https://github.com/hyperium/hyper/issues/3252 )
Features
client: Make clients able to use non-Send executor (#3184 )
([d977f209](d977f209bc
),
closes https://github.com/hyperium/hyper/issues/3017 )
rt:
replace IO traits with hyper::rt ones (#3230 )
([f9f65b7a](f9f65b7aa6
),
closes https://github.com/hyperium/hyper/issues/3110 )
add downcast on Sleep trait (#3125 )
([d92d3917](d92d3917d9
),
closes https://github.com/hyperium/hyper/issues/3027 )
service: change Service::call to take &self (#3223 )
([d894439e](d894439e00
),
closes https://github.com/hyperium/hyper/issues/3040 )
Breaking Changes
Any IO transport type provided must not implement hyper::rt::{Read,
Write} instead of tokio::io traits. You can grab a helper type from
hyper-util to wrap Tokio types, or implement the traits yourself, if
it's a custom type.
([f9f65b7a](f9f65b7aa6
))
client::conn::http2 types now use another generic for an Executor. Code
that names Connection needs to include the additional generic parameter.
([d977f209](d977f209bc
))
The Service::call function no longer takes a mutable reference to self.
The FnMut trait bound on the service::util::service_fn function and the
trait bound on the impl for the ServiceFn struct were changed from FnMut
to Fn.
2023-07-31 07:34:53 -06:00
Aapo Alasuutari
e348c11b64
perf(ext/ffi): Avoid receiving on FFI async work channel when no UnsafeCallback exists ( #19454 )
2023-07-30 16:43:22 +03:00
Marcos Casagrande
ee7f36afdb
fix(ext/compression): throw TypeError on corrupt input ( #19979 )
...
`TypeError` should be thrown when decompressing a corrupt input
2023-07-30 09:15:29 -04:00
Felipe Baltor
3cb260ed15
fix(Deno.serve): accessing .url on cloned request throws ( #19869 )
...
This PR fixes #19818 . The problem was that the new InnerRequest class does not initialize the fields urlList and urlListProcessed that are used during a request clone. The solution aims to be straightforward by simply initializing the missing properties during the clone process. I also implemented a "cache" to the url getter of the new InnerRequest, avoiding the cost of calling op_http_get_request_method_and_url.
2023-07-30 09:13:28 -04:00
David Sherret
279030f2b8
fix(npm): improve declaration resolution for filename with different extensions ( #19966 )
...
postcss was importing `./index.js` from `./index.d.mts` where there also
existed a `./index.d.ts`.
Closes #19575
2023-07-28 11:24:22 -04:00
Divy Srivastava
bddf5acf89
chore: remove unused dependencies ( #19962 )
2023-07-28 15:10:13 +05:30
Leo Kettmeir
5cb1d18439
feat: Deno.createHttpClient allowHost ( #19689 )
...
This adds an option to allow using the host header in a fetch call.
Closes https://github.com/denoland/deno/issues/16840
Ref https://github.com/denoland/deno/issues/11017
2023-07-28 09:01:06 +02:00
Leo Kettmeir
cbfa98ea0b
feat(ext/websocket): allow HTTP(S) protocol in URL ( #19862 )
...
Closes #19093
2023-07-28 06:29:41 +00:00
David Sherret
cfc0c80642
fix(node): package path not exported error - add if types resolution was occurring ( #19963 )
2023-07-27 16:27:01 +00:00
Matt Mastracci
53e077133f
fix(ext/fs): fix MaybeArc when not sync_fs ( #19950 )
2023-07-26 15:33:42 +00:00
denobot
89ba3f820c
1.35.3 ( #19947 )
...
Bumped versions for 1.35.3
Co-authored-by: mmastrac <mmastrac@users.noreply.github.com>
2023-07-26 10:18:02 -04:00
Matt Mastracci
7616ffe167
fix(ext/http): Quietly ignore invalid status codes ( #19936 )
2023-07-25 18:12:19 -04:00
Bartek Iwańczuk
06209f824c
perf: cache node resolution when accesing a global ( #19930 )
...
Reclaims some of the performance hit introduced by
https://github.com/denoland/deno/pull/19307 .
2023-07-25 23:43:00 +02:00
Bartek Iwańczuk
bd79baea5e
fix(node): add writable and readable fields to FakeSocket ( #19931 )
...
Closes https://github.com/denoland/deno/issues/19927
2023-07-25 07:17:53 +00:00
Yoshiya Hinosawa
3d35900639
fix(ext/net): fix string port number handling in listen ( #19921 )
...
While string `port` is not allowed in typing, it seems we used to
support that and now it's broken. ref:
https://github.com/denoland/deno/issues/10064#issuecomment-1637427260
This PR restores the support of string port number in `listen` and
`listenTls`
2023-07-25 06:26:18 +00:00
David Sherret
40008c73bb
refactor(ext/node): CjsCodeAnalyzer - analyze_cjs optionally pass source text ( #19896 )
2023-07-24 15:35:13 -04:00
Vedant Pandey
d7a9ed9714
fix(node_compat): Wrap require resolve exports in try catch block ( #19592 )
...
Potentially closes #19499
2023-07-24 11:30:03 +03:00
Luca Casonato
15290499b5
fix(ext/node): inspector with seggregated globals ( #19917 )
...
V8 doesn't like having internal slots on the "real" globalThis object.
This commit works around this limitation by storing the inner globalThis
objects for segregated globals in a context slot.
2023-07-24 00:39:37 +02:00
sigmaSd
5a3dbe1a62
chore: update commonjs loading docs ( #19904 )
2023-07-22 05:48:06 +02:00
Leo Kettmeir
da709729e3
fix(node/http): add encrypted field to FakeSocket ( #19886 )
...
Fixes #19557
2023-07-21 02:18:07 +02:00
Matt Mastracci
bf775e3306
refactor(ext/http): Use const thread-local initializer for slightly better perf ( #19881 )
...
Benchmarking shows numbers are pretty close, however this is recommended
for the best possible thread-local performance and may improve in future
Rust compiler revisions.
2023-07-20 07:30:17 -06:00
denobot
0c3bbf7acd
chore: forward v1.35.2 release commit to main ( #19887 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-20 05:11:50 +02:00
Matt Mastracci
aa95a3a6e0
fix(ext/http): Error on deprecated/unavailable features ( #19880 )
...
Throws an error when user code attempts to use unsupported options (may
help reduce confusion when migrating to Deno.serve)
2023-07-19 12:43:49 -06:00
Luca Casonato
e511022c74
feat(ext/node): properly segregate node globals ( #19307 )
...
Code run within Deno-mode and Node-mode should have access to a
slightly different set of globals. Previously this was done through a
compile time code-transform for Node-mode, but this is not ideal and has
many edge cases, for example Node's globalThis having a different
identity than Deno's globalThis.
This commit makes the `globalThis` of the entire runtime a semi-proxy.
This proxy returns a different set of globals depending on the caller's
mode. This is not a full proxy, because it is shadowed by "real"
properties on globalThis. This is done to avoid the overhead of a full
proxy for all globalThis operations.
The globals between Deno-mode and Node-mode are now properly segregated.
This means that code running in Deno-mode will not have access to Node's
globals, and vice versa. Deleting a managed global in Deno-mode will
NOT delete the corresponding global in Node-mode, and vice versa.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-07-19 10:30:04 +02:00
Leo Kettmeir
bf4e99cbd7
fix(node/http): call callback after request is sent ( #19871 )
...
Fixes #19762
2023-07-19 01:30:19 +02:00
Leo Kettmeir
bab0294db6
fix(node/net): Server connection callback include socket value ( #19779 )
2023-07-19 00:33:43 +02:00
Divy Srivastava
51b3534b3d
fix(ext/node): check if resource can be used with write_vectored ( #19868 )
...
Fixes https://github.com/denoland/deno/issues/19766
Fixes https://github.com/denoland/deno/issues/19846
2023-07-18 23:34:26 +02:00
Bartek Iwańczuk
7e1218cd8f
fix(node): add process.dlopen API ( #19860 )
...
Fixes https://github.com/denoland/deno/issues/19830
2023-07-18 15:13:17 +02:00
David Sherret
b09af6a424
fix(npm): support dynamic import of Deno TS from npm package ( #19858 )
...
Closes #19843
2023-07-17 17:17:58 -04:00
David Sherret
4ebe3bdb06
fix(node): improve error message requiring non-npm es module ( #19856 )
...
Closes #19842
Closes #16913
2023-07-17 16:19:00 -04:00
David Sherret
7a9f7f3419
fix(node): improve require esm error messages ( #19853 )
...
Part of #19842 .
Closes #19583
Closes #16913
2023-07-17 14:00:44 -04:00
await-ovo
37241e9b1e
fix(ext/node): fix stream/promises export ( #19820 )
2023-07-17 22:10:34 +09:00
Matt Mastracci
8465bd0037
chore: update to Rust 1.71 ( #19822 )
2023-07-13 15:16:24 -06:00
David Sherret
2f4b73410a
chore: forward 1.35.1 back to main ( #19814 )
2023-07-12 21:36:42 -04:00
Leo Kettmeir
9d5f6f67d6
fix(node/http): add destroy to FakeSocket ( #19796 )
...
Closes #19782
2023-07-11 15:08:35 +02:00
Leo Kettmeir
4cfc54931d
fix(node/http): allow callback in first argument of end call ( #19778 )
...
Closes #19762
2023-07-11 14:49:19 +02:00
Leo Kettmeir
5cda141f2d
fix(node/http): server use FakeSocket and add end method ( #19660 )
...
Fixes #19324
2023-07-10 13:48:35 +02:00
Bartek Iwańczuk
1edc8693bf
chore: upgrade deno_core and rusty_v8 ( #19773 )
2023-07-09 22:48:47 +00:00
David Sherret
f3095b8d31
chore: upgrade to dprint 0.39 ( #19768 )
2023-07-08 18:34:08 +00:00
Divy Srivastava
e4870d84be
perf(ext/node): native vectored write for server streams ( #19752 )
...
```
# main
$ ./load_test 10 0.0.0.0 8080 0 0
Using message size of 20 bytes
Running benchmark now...
Msg/sec: 106182.250000
Msg/sec: 110279.750000
^C
# this PR
$ ./load_test 10 0.0.0.0 8080 0 0
Using message size of 20 bytes
Running benchmark now...
Msg/sec: 131632.250000
Msg/sec: 134754.250000
^C
```
2023-07-07 22:17:08 +05:30