1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 13:59:01 -05:00
denoland-deno/cli
Matt Mastracci 3392a8e530
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-18 17:05:01 +02:00
..
args feat(compile): unstable npm and node specifier support (#19005) 2023-05-11 17:26:30 -04:00
bench perf(core): async op pseudo-codegen and performance work (#18887) 2023-05-04 16:18:10 +02:00
cache refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
js fix(core): let V8 drive extension ESM loads (#18997) 2023-05-11 17:26:27 -04:00
lsp refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
napi 1.33.3 (#19110) 2023-05-12 13:06:53 +02:00
npm refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02: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-18 17:05:01 +02:00
tests refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
tools refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
tsc fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108) 2023-05-18 17:05:01 +02:00
util refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02: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 17:26:31 -04:00
Cargo.toml 1.33.3 (#19110) 2023-05-12 13:06:53 +02: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 1.33.3 (#19110) 2023-05-12 13:06:53 +02: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-11 17:26:30 -04:00
file_fetcher.rs perf: lazily create RootCertStore (#18938) 2023-05-04 16:18:49 +02:00
graph_util.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-11 17:26:30 -04:00
http_util.rs perf: lazily create RootCertStore (#18938) 2023-05-04 16:18:49 +02: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-18 17:05:01 +02:00
module_loader.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-11 17:26:30 -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-11 17:26:30 -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-04 16:18:43 +02:00
worker.rs refactor(ext/node): combine deno_node::Fs with deno_fs::FileSystem (#18991) 2023-05-11 17:26:25 -04: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.