1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00
denoland-deno/ext/http
David Sherret 661882f10d
perf(http): make heap allocation for path conditional (#26289)
Code:

```js
Deno.serve({ port: 8085 }, request => {
  return new Response(request.url);
});
```

Before:

```
% wrk -d60s http://localhost:8085/path/testing\?testing=5
Running 1m test @ http://localhost:8085/path/testing?testing=5
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    56.01us   18.34us   3.28ms   93.84%
    Req/Sec    81.80k     3.13k   88.26k    90.77%
  9783713 requests in 1.00m, 1.67GB read
Requests/sec: 162789.89
Transfer/sec:     28.41MB
```

After:

```
% wrk -d60s http://localhost:8085/path/testing\?testing=5
Running 1m test @ http://localhost:8085/path/testing?testing=5
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    55.44us   15.20us   2.42ms   90.41%
    Req/Sec    82.71k     2.92k   88.10k    89.93%
  9892916 requests in 1.00m, 1.69GB read
Requests/sec: 164607.06
Transfer/sec:     28.73MB
```
2024-10-16 00:43:20 -04:00
..
benches chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
00_serve.ts refactor(ext): align error messages (#25496) 2024-09-18 18:19:45 -07:00
01_http.js refactor(ext): align error messages (#25496) 2024-09-18 18:19:45 -07:00
02_websocket.ts fix(ext/websocket): change default idleTimeout to 30s (#23985) 2024-05-26 10:46:05 +05:30
Cargo.toml 2.0.0 (#26063) 2024-10-08 07:37:28 -07:00
compressible.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
fly_accept_encoding.rs perf(http): avoid clone getting request method and url (#26250) 2024-10-14 23:25:47 -04:00
http_next.rs perf(http): make heap allocation for path conditional (#26289) 2024-10-16 00:43:20 -04:00
lib.rs feat(ext/http): Implement request.signal for Deno.serve (#23425) 2024-04-24 14:03:37 -04:00
network_buffered_stream.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
reader_stream.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
README.md chore: add README to ext/http/ (#11958) 2021-09-08 20:48:28 +02:00
request_body.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
request_properties.rs perf(http): avoid clone getting request method and url (#26250) 2024-10-14 23:25:47 -04:00
response_body.rs perf(ext/http): Reduce size of ResponseBytesInner (#24840) 2024-08-02 00:30:26 +00:00
service.rs perf(ext/http): Reduce size of ResponseBytesInner (#24840) 2024-08-02 00:30:26 +00:00
websocket_upgrade.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00

deno_http

This crate implements server-side HTTP based on primitives from the Fetch API.