1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 09:10:40 -05:00
denoland-deno/cli
Matt Mastracci 9845361153
refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056)
Partially supersedes #19016.

This migrates `spawn` and `spawn_blocking` to `deno_core`, and removes
the requirement for `spawn` tasks to be `Send` given our single-threaded
executor.

While we don't need to technically do anything w/`spawn_blocking`, this
allows us to have a single `JoinHandle` type that works for both cases,
and allows us to more easily experiment with alternative
`spawn_blocking` implementations that do not require tokio (ie: rayon).

Async ops (+~35%):

Before: 

```
time 1310 ms rate 763358
time 1267 ms rate 789265
time 1259 ms rate 794281
time 1266 ms rate 789889
```

After:

```
time 956 ms rate 1046025
time 954 ms rate 1048218
time 924 ms rate 1082251
time 920 ms rate 1086956
```

HTTP serve (+~4.4%):

Before:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    68.78us   19.77us   1.43ms   86.84%
    Req/Sec    68.78k     5.00k   73.84k    91.58%
  1381833 requests in 10.10s, 167.36MB read
Requests/sec: 136823.29
Transfer/sec:     16.57MB
```

After:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    63.12us   17.43us   1.11ms   85.13%
    Req/Sec    71.82k     3.71k   77.02k    79.21%
  1443195 requests in 10.10s, 174.79MB read
Requests/sec: 142921.99
Transfer/sec:     17.31MB
```

Suggested-By: alice@ryhl.io
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-14 15:40:01 -06:00
..
args feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
bench perf(core): async op pseudo-codegen and performance work (#18887) 2023-04-30 08:50:24 +00:00
cache refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
js fix(core): let V8 drive extension ESM loads (#18997) 2023-05-09 12:37:13 +02:00
lsp refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
napi chore: forward v1.33.3 release commit to main (#19111) 2023-05-12 14:47:27 +00:00
npm refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
ops refactor(node): move most of cli/node to ext/node (#18797) 2023-04-21 21:02:46 -04:00
schemas feat(cli): flatten deno.json configuaration (#17799) 2023-04-26 23:02:36 -04:00
standalone fix(lsp): increase default max heap size to 3Gb (#19115) 2023-05-13 19:42:34 +00:00
tests refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
tools refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
tsc fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108) 2023-05-14 20:27:14 +09:00
util refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
auth_tokens.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
build.rs fix(cli): upgrade to Typescript 5.0.4 (#19090) 2023-05-11 14:12:58 +00:00
Cargo.toml chore: forward v1.33.3 release commit to main (#19111) 2023-05-12 14:47:27 +00:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs chore: forward v1.33.3 release commit to main (#19111) 2023-05-12 14:47:27 +00:00
emit.rs refactor: break up ProcState (#18707) 2023-04-14 16:22:33 -04:00
errors.rs feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
factory.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
file_fetcher.rs perf: lazily create RootCertStore (#18938) 2023-05-01 16:42:05 -04:00
graph_util.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
http_util.rs perf: lazily create RootCertStore (#18938) 2023-05-01 16:42:05 -04:00
js.rs refactor(core): Improve ergonomics of managing ASCII strings (#18498) 2023-04-04 06:46:31 -06:00
main.rs refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
module_loader.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
node.rs refactor(ext/node): allow injecting NodeFs from CLI (#18829) 2023-04-24 19:44:35 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
watcher.rs refactor(cli): remove ProcState - add CliFactory (#18900) 2023-05-01 14:35:23 -04:00
worker.rs refactor(ext/node): combine deno_node::Fs with deno_fs::FileSystem (#18991) 2023-05-05 16:44:24 +00:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.