Pull request review commentdenoland/deno

Add rust test for snapshotting

 impl Isolate {     let shared = SharedQueue::new(RECOMMENDED_SIZE);      let needs_init = true;-    // Seperate into Option values for eatch startup type-    let (startup_snapshot, startup_script) = match startup_data {-      StartupData::Snapshot(d) => (Some(d), None),-      StartupData::Script(d) => (None, Some(d)),-      StartupData::None => (None, None),-    };-    let libdeno_config = libdeno::deno_config {-      will_snapshot: 0,-      load_snapshot: match startup_snapshot {-        Some(s) => Snapshot2::from(s),-        None => Snapshot2::empty(),-      },++    let mut startup_script: Option<Script> = None;+    let mut libdeno_config = libdeno::deno_config {+      will_snapshot: if config.will_snapshot { 1 } else { 0 },+      load_snapshot: Snapshot2::empty(),       shared: shared.as_deno_buf(),       recv_cb: Self::pre_dispatch,     };++    // Seperate into Option values for eatch startup type

eatch -> each

ry

comment created time in 2 hours

create barnchpiscisaureus/deno

branch : not_trait

created branch time in 2 hours

create barnchpiscisaureus/deno

branch : ops_back

created branch time in 17 hours

push eventpiscisaureus/deno

Bert Belder

commit sha bcec7c3504d0f43aeba31ee595660ff35032b41a

WIP

view details

push time in 17 hours

push eventpiscisaureus/deno

Kevin (Kun) "Kassimo" Qian

commit sha c8db224efed08d7722c9951cde048d731db050d3

Make Deno/Deno.core not deletable/writable (#2153)

view details

Maxim Mazurok

commit sha 8dc8f227603831513b2d4afc62261908665e6a2f

Exclude .png files from git auto-EOL (#2161) Fix #1995 for users with the old git version

view details

Jonathon Orsi

commit sha 648d2f3ba8e4677ce2e9440e05a165927e982f05

fix typo in permissions explanation (#2162)

view details

Daniel Schildt

commit sha df8fb6070981d80f05e9a5f97e9c61bce09d3fe2

docs: improve clarity of the text (#2165)

view details

Matt Harrison

commit sha c08075053f16e8c799c2132373a2deb6e896a9e9

Fix link to http_bench example in core README (#2167)

view details

Bartek Iwańczuk

commit sha cd19da62d9efe37566fdeff16e37ed066edd3e3a

Refactor CLI entry point (#2157) Changes "deno --types" to "deno types" and "deno --prefetch" to "deno prefetch"

view details

Ryan Dahl

commit sha 961f87e1c5d0cbe312a02997123e65fc315afb06

Fixes #2033, shared queue push bug (#2158)

view details

Ryan Dahl

commit sha 8ba6e4fa137059a77ceed88de937bbb6c5276c45

Fix flaky tests (#2164)

view details

Ryan Dahl

commit sha f77b112797ffd686958928818a1b6acfdda197fe

Remove dead code js/compiler_test.ts (#2160)

view details

Tomislav Fabeta

commit sha 6cded14bdf313762956d4d5361cfe8115628b535

Issue/2170 (#2175) * Consistency using requiredArguments method Replaced tuple length check in Headers class with requiredArguments method. * Consistency using requiredArguments method Replaced tuple length check in UrlSearchParams class with requiredArguments method. * fmt

view details

Ryan Dahl

commit sha 9dfebbc9496138efbeedc431068f41662c780f3e

Fix eslint warnings (#2151) Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>

view details

Kevin (Kun) "Kassimo" Qian

commit sha 1d4b92ac85d8c850270ca859f928404c72c0a49a

Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (#2177)

view details

Tomislav Fabeta

commit sha d9408017541ffe6c86f4904973c22f829ade1ac4

Simplify logic in URLSearchParams, Buffer, Console (#2174)

view details

Yingbo (Max) Wang

commit sha da64fba046e4f324bff62d71ae74906fa6e3421f

symlink: Ignore type parameter on non-Windows platforms (#2185) Fixes #2169

view details

Bert Belder

commit sha 6caf8655070211d9771d349492c18d56c03b12b8

third_party: upgrade rust crates

view details

Ryan Dahl

commit sha 675919e915650cd1c88a1cdb4f67310133b8a05e

Use tokio_threadpool's new panic_handler (#2188)

view details

Ryan Dahl

commit sha d68b44b6b2fad6c321aa01a039030bb98c5be88d

core: make Isolate concrete, remove Dispatch trait (#2183) Op dispatch is now dynamically dispatched, so slightly less efficient. The immeasurable perf hit is a reasonable trade for the API simplicity that is gained here.

view details

Bert Belder

commit sha 1187fe5b3ae16619f59ad1d618e62acd1ace8199

wip x wip compiles again context future add context fix new() method temp temp x

view details

push time in a day

Pull request review commentdenoland/deno

core: Add struct Config and make Isolate not generic

 pub enum StartupData<'a> {   None, } -/// Defines the how Deno.core.dispatch() acts.-pub trait Dispatch {+#[derive(Default)]+pub struct Config {+  dispatch: Option<Arc<Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync>>,+}++impl Config {+  /// Defines the how Deno.core.dispatch() acts.   /// Called whenever Deno.core.dispatch() is called in JavaScript. zero_copy_buf   /// corresponds to the second argument of Deno.core.dispatch().-  fn dispatch(-    &mut self,-    control: &[u8],-    zero_copy_buf: deno_buf,-  ) -> (bool, Box<Op>);+  pub fn dispatch<F>(&mut self, f: F)+  where+    F: Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync + 'static,

hmm why does F need Send and Sync ?

ry

comment created time in a day

Pull request review commentdenoland/deno

core: Add struct Config and make Isolate not generic

 pub enum StartupData<'a> {   None, } -/// Defines the how Deno.core.dispatch() acts.-pub trait Dispatch {+#[derive(Default)]+pub struct Config {+  dispatch: Option<Arc<Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync>>,

Note for later: I don't think dispatch() should return an Option. We could opt (muhaha) to panic if the dispatcher doesn't recognize an op, or alternatively it could dispatch to "UnknownOp" which would always respond with an error.

ry

comment created time in a day

create barnchpiscisaureus/deno

branch : ops_2_temp

created branch time in a day

delete branch piscisaureus/deno

delete branch : upgrade_crates

delete time in a day

push eventdenoland/deno_third_party

Bert Belder

commit sha 88acf8ea59d67442f7e06abf6fe73cf9d2ef3261

Upgrade rust crates

view details

push time in a day

push eventdenoland/deno

Bert Belder

commit sha 6caf8655070211d9771d349492c18d56c03b12b8

third_party: upgrade rust crates

view details

push time in a day

PR merged denoland/deno

third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+85 -38

0 comment

4 changed files

piscisaureus

pr closed time in a day

PR opened denoland/deno

Reviewers
third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+85 -38

0 comment

4 changed files

pr created time in a day

create barnchpiscisaureus/deno

branch : upgrade_crates

created branch time in a day

create barnchdenoland/deno_third_party

branch : 20190423_upgrade_crates

created branch time in a day

push eventpiscisaureus/deno

Bert Belder

commit sha 40430f5e460d95b8c8e6a66da0ab0ac03e330b7a

fix new() method

view details

push time in 5 days

push eventpiscisaureus/deno

Bert Belder

commit sha 6ccad81b7c64fb884bc2f8266e76bd4b466b8b8a

add context

view details

push time in 5 days

push eventpiscisaureus/deno

Bert Belder

commit sha d4b4f9f685c31d4eb1e905e0b11d139d992bec98

context future

view details

push time in 5 days

create barnchpiscisaureus/deno

branch : ops

created branch time in 5 days

Pull request review commentdenoland/deno

core: test Modules::deps and handle error cases better

 impl Deps {           new_prefix.push(' ');

The construction of this string would be more readable using format!()

ry

comment created time in 6 days

push eventry/deno

Bert Belder

commit sha 6b24084437afd1113225ade14c1e8f21fe7a9434

suggestions

view details

push time in 6 days

pull request commentdenoland/deno

core: test Modules::deps and handle error cases better

Suggestions for improvement: https://github.com/denoland/deno/pull/2141/commits/27021f3ea93876a642f2c862d586e2ff6049e601

ry

comment created time in 6 days

push eventry/deno

Bert Belder

commit sha 27021f3ea93876a642f2c862d586e2ff6049e601

suggestions

view details

push time in 6 days

Pull request review commentdenoland/deno

core: test Modules::deps and handle error cases better

 impl Deps {     is_last: bool,     modules: &Modules,     name: &str, // TODO(ry) rename url-  ) -> Deps {+  ) -> Option<Deps> {     if seen.contains(name) {-      Deps {+      Some(Deps {         name: name.to_string(),         prefix,         deps: None,         is_last,-      }+      })     } else {+      let maybe_children = modules.get_children2(name);+      if maybe_children.is_none() {+        return None;+      }+      let children = maybe_children.unwrap();+       seen.insert(name.to_string());-      let children = modules.get_children2(name).unwrap();-      let child_count = children.iter().count();-      let deps = children+      let child_count = children.len();+      let mut maybe_deps: Vec<Option<Deps>> = children
variable does not need to be mutable

note: #[warn(unused_mut)] on by default
help: remove this `mut`: ``
ry

comment created time in 6 days

Pull request review commentdenoland/deno

core: test Modules::deps and handle error cases better

 impl Deps {     is_last: bool,     modules: &Modules,     name: &str, // TODO(ry) rename url-  ) -> Deps {+  ) -> Option<Deps> {     if seen.contains(name) {-      Deps {+      Some(Deps {         name: name.to_string(),         prefix,         deps: None,         is_last,-      }+      })     } else {+      let maybe_children = modules.get_children2(name);
this block may be rewritten with the `?` operator

note: #[warn(clippy::question_mark)] on by default
help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
help: replace_it_with: `maybe_children?;`
ry

comment created time in 6 days

Pull request review commentdenoland/deno

core: test Modules::deps and handle error cases better

 pub struct Deps { }  impl Deps {-  pub fn new(modules: &Modules, module_name: &str) -> Deps {+  fn new(modules: &Modules, module_name: &str) -> Option<Deps> {

If this function returns an Option<Deps> then I think the field Deps::deps shouldn't be an Option any more.

ry

comment created time in 6 days

Pull request review commentdenoland/deno

core: test Modules::deps and handle error cases better

 impl Deps {            Self::helper(seen, new_prefix, new_is_last, modules, dep_name)         }).collect();-      Deps {++      // If any of the children are missing, return None.

Some notes on this section (up to line 378):

  • I get the clippy warning: this block may be rewritten with the?operator. Not sure what it has in mind exactly though.
  • The whole thing can be written shorter and more efficiently by relying on the fact that the collect() method can turn an iterator over Option<T> into an Option<Vec<T> (this also works for Result and for different types of collections). Replace it with this: let deps = maybe_deps.into_iter().collect::<Option<_>>()?;
ry

comment created time in 6 days

Pull request review commentdenoland/deno

core: test Modules::deps and handle error cases better

 pub fn print_file_info(worker: &Worker, url: &str) {     );   } -  let deps = worker.modules.deps(&out.module_name);-  println!("{}{}", ansi::bold("deps:\n".to_string()), deps.name);-  if let Some(ref depsdeps) = deps.deps {-    for d in depsdeps {-      println!("{}", d);+  if let Some(deps) = worker.modules.deps(&out.module_name) {+    println!("{}{}", ansi::bold("deps:\n".to_string()), deps.name);+    if let Some(ref depsdeps) = deps.deps {+      for d in depsdeps {+        println!("{}", d);+      }     }+  } else {+    println!(+      "{}{}",+      ansi::bold("deps: ".to_string()),+      "cannot retrieve full dependency graph"
literal with an empty format string

note: #[warn(clippy::print_literal)] on by default
help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal
ry

comment created time in 6 days

push eventpiscisaureus/deno

Bert Belder

commit sha c2545e4abfdac4771219156ab84e589cadaa3131

wip

view details

push time in 6 days

push eventpiscisaureus/deno

Bert Belder

commit sha 024d4163471ebca9d50a7118fd0e8b026b2406ae

x

view details

push time in 6 days

create barnchpiscisaureus/deno

branch : wip

created branch time in 7 days

issue commentdenoland/deno

Rename Deno into deno

Casing has nothing to do with modern vs legacy. The EcmaScript standard typically uses UpperCamelCase for namespaces, even those that are not classes (e.g. Reflect, Symbol, Math). DOM standards which are defined by W3C use lowercase names (e.g. document, window, location); performance falls in the latter category.

Alexsey

comment created time in 7 days

issue commentdenoland/deno

Rename Deno into deno

We used to (at least conventionally) have it as deno in the past when we import the APIs as if it was a module (import * as deno from "deno", this usage is no longer available). However, PascalCases are also used in JS e.g. for Math/Reflect to represent namespaces, so it is actually following JS/TS convention

It's still available though: const deno = Deno; and you're all set.

Alexsey

comment created time in 7 days

delete branch piscisaureus/deno

delete branch : clippy

delete time in 8 days

push eventdenoland/deno

Bert Belder

commit sha 8477daa8b970ae8ef042a5242aee705003b63fc1

Fix clippy warnings

view details

push time in 8 days

PR merged denoland/deno

Fix clippy warnings

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+22 -27

0 comment

9 changed files

piscisaureus

pr closed time in 8 days

PR closed denoland/deno

WIP: message ring buffer

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+2065 -129

5 comments

31 changed files

piscisaureus

pr closed time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000

Add cli dependency on tokio-rustls

view details

Bert Belder

commit sha 8477daa8b970ae8ef042a5242aee705003b63fc1

Fix clippy warnings

view details

push time in 8 days

delete branch piscisaureus/deno

delete branch : add_tokio_rustls

delete time in 8 days

push eventdenoland/deno_third_party

Bert Belder

commit sha 7f84b86df3b3d9cc3ae0c92ea94b68e15b26557a

Upgrade rust crates

view details

push time in 8 days

push eventdenoland/deno

Bert Belder

commit sha 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000

Add cli dependency on tokio-rustls

view details

push time in 8 days

PR merged denoland/deno

Add tokio-rustls

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+13 -10

1 comment

5 changed files

piscisaureus

pr closed time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha 870bf928c0f1c5926a3ccd702e7855fc88162cb2

Fix clippy warnings

view details

push time in 8 days

PR opened denoland/deno

Reviewers
Fix clippy warnings

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+23 -27

0 comment

9 changed files

pr created time in 8 days

create barnchpiscisaureus/deno

branch : clippy

created branch time in 8 days

pull request commentdenoland/deno

Add tokio-rustls

@jorsi Can you use tokio-rustls instead of tokio-tls?

piscisaureus

comment created time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000

Add cli dependency on tokio-rustls

view details

push time in 8 days

PR opened denoland/deno

Add tokio-rustls

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+13 -10

0 comment

5 changed files

pr created time in 8 days

create barnchpiscisaureus/deno

branch : add_tokio_rustls

created branch time in 8 days

create barnchdenoland/deno_third_party

branch : 20194017_upgrade_crates

created branch time in 8 days

delete branch piscisaureus/deno

delete branch : hyper_patch_fix

delete time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha 7807afa97274d3b0645d70475fecb37f5dc8ba14

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

Bert Belder

commit sha e48659b4a70d6b7b4d6257af8bac76b6b78e88dd

Disable tests that don't work for me

view details

Bert Belder

commit sha c9ebe45a0b17f0310b5b99f61ac0ec2b207787c8

Give ops a name

view details

push time in 8 days

delete branch piscisaureus/deno

delete branch : core_latency

delete time in 8 days

push eventdenoland/deno

Bert Belder

commit sha 2719631038918577c66db2558bbba457c8f4cfd9

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha dd595220abed9e4f9dd88e14110eb67f4f5e77be

core: run isolate tests within a task This change is made in preparation for using FuturesUnordered to track futures that are spawned by the isolate. FuturesUnordered sets up notififications for every future that it finds to be not ready when polled, which causes a crash if attempted outside of a task context.

view details

Bert Belder

commit sha 7807afa97274d3b0645d70475fecb37f5dc8ba14

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

push time in 8 days

PR merged denoland/deno

Use FuturesUnordered to track ops, fix latency issues

Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side.

Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it:

  • It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second.

  • Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

+194 -143

1 comment

2 changed files

piscisaureus

pr closed time in 8 days

pull request commentdenoland/deno

Use FuturesUnordered to track ops, fix latency issues

It would be cool to have all the text your wrote in the description of this PR in the commit message.

I did already

piscisaureus

comment created time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha 7807afa97274d3b0645d70475fecb37f5dc8ba14

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

push time in 8 days

pull request commentdenoland/deno

Move deno_core_http_bench into examples dir

https://github.com/denoland/deno/pull/2131 makes some changes to http_bench.rs. I'd prefer to land those first before moving the file, that makes rebasing less painful.

ry

comment created time in 8 days

PR opened denoland/deno

Reviewers
Use FuturesUnordered to track ops, fix latency issues

Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side.

Although this makes performance a bit worse (about 10% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it:

  • It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second.

  • Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

+200 -147

0 comment

3 changed files

pr created time in 8 days

push eventpiscisaureus/deno

Dmitry Sharshakov

commit sha 0c463582206881b6461742633a67f51632db614e

Add max memory benchmark (#2061)

view details

Ryan Dahl

commit sha 1bfb44336914a775cd01120165517394d30aec23

Implement async module loading in CLI (#2084)

view details

Bert Belder

commit sha 2719631038918577c66db2558bbba457c8f4cfd9

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha dd595220abed9e4f9dd88e14110eb67f4f5e77be

core: run isolate tests within a task This change is made in preparation for using FuturesUnordered to track futures that are spawned by the isolate. FuturesUnordered sets up notififications for every future that it finds to be not ready when polled, which causes a crash if attempted outside of a task context.

view details

Bert Belder

commit sha 5bbec76400345604e44c98dce3e4a7c8b4b21eab

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 10% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

Bert Belder

commit sha 46447fe249d2fad33bb2387156337f2ec0bbaaa5

Disable tests that don't work for me

view details

Bert Belder

commit sha c31c7b9e931c1e62934e13bffce5c0bf3ca24715

Give ops a name

view details

push time in 8 days

create barnchpiscisaureus/deno

branch : core_latency

created branch time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha a1851568433048ae91105033ca93dc2df86a2c83

core: run isolate tests within a task This change is made in preparation for using FuturesUnordered to track futures that are spawned by the isolate. FuturesUnordered sets up notififications for every future that it finds to be not ready when polled, which causes a crash if attempted outside of a task context.

view details

Bert Belder

commit sha 89dbadfff4abe1ed4abcbef254c2d69b7eec39c5

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 10% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

Bert Belder

commit sha caded9799799bfd9fbce2640b4c6bd05ff0e6b19

Disable tests that don't work for me

view details

Bert Belder

commit sha 9303bc58d97a9bcdb54b181f8d34f815d30eb7ce

Give ops a name

view details

push time in 8 days

Pull request review commentdenoland/deno

Implement async module loading in CLI

 pub trait Loader {   } } -// TODO(ry) This is basically the same thing as RustOrJsError. They should be-// combined into one type.-pub enum Either<E> {-  JSError(JSError),-  Other(E),+struct PendingLoad<E: Error> {+  url: String,+  is_root: bool,+  source_code_future: Box<SourceCodeFuture<E>>, }  /// This future is used to implement parallel async module loading without-/// complicating the Isolate API.-pub struct RecursiveLoad<'l, L: Loader> {-  loader: &'l mut L,-  pending: HashMap<String, Box<SourceCodeFuture<<L as Loader>::Error>>>,-  root: String,+/// complicating the Isolate API. Note that RecursiveLoad will take ownership of+/// an Isolate during load.+pub struct RecursiveLoad<L: Loader> {+  loader: Option<L>,+  pending: Vec<PendingLoad<L::Error>>,+  is_pending: HashSet<String>,+  phantom: PhantomData<L>,+  // TODO(ry) The following can all be combined into a single enum State type.+  root: Option<String>,           // Empty before polled.+  root_specifier: Option<String>, // Empty after first poll+  root_id: Option<deno_mod>, } -impl<'l, L: Loader> RecursiveLoad<'l, L> {+impl<L: Loader> RecursiveLoad<L> {   /// Starts a new parallel load of the given URL.-  pub fn new(url: &str, loader: &'l mut L) -> Self {-    let root = L::resolve(url, ".");-    let mut recursive_load = Self {-      loader,-      root: root.clone(),-      pending: HashMap::new(),+  pub fn new(url: &str, loader: L) -> Self {+    Self {+      loader: Some(loader),+      root: None,+      root_specifier: Some(url.to_string()),+      root_id: None,+      pending: Vec::new(),+      is_pending: HashSet::new(),+      phantom: PhantomData,+    }+  }++  fn take_loader(&mut self) -> L {+    self.loader.take().unwrap()+  }++  fn add(+    &mut self,+    specifier: &str,+    referrer: &str,+    parent_id: Option<deno_mod>,+  ) -> Result<String, L::Error> {+    let url = L::resolve(specifier, referrer)?;++    let is_root = if let Some(parent_id) = parent_id {+      let loader = self.loader.as_mut().unwrap();+      let modules = loader.modules();+      modules.add_child(parent_id, &url);+      false+    } else {+      true     };-    recursive_load-      .pending-      .insert(root.clone(), recursive_load.loader.load(&root));-    recursive_load++    if !self.is_pending.contains(&url) {+      self.is_pending.insert(url.clone());+      let source_code_future = {+        let loader = self.loader.as_mut().unwrap();+        loader.load(&url)+      };+      self.pending.push(PendingLoad {+        url: url.clone(),+        source_code_future,+        is_root,+      });+    }++    Ok(url)   } } -impl<'l, L: Loader> Future for RecursiveLoad<'l, L> {-  type Item = deno_mod;-  type Error = Either<L::Error>;+// TODO(ry) This is basically the same thing as RustOrJsError. They should be+// combined into one type.+#[derive(Debug, PartialEq)]+pub enum Either<E> {+  JSError(JSError),+  Other(E),+}++impl<L: Loader> Future for RecursiveLoad<L> {+  type Item = (deno_mod, L);

I find that returning the loader from the future is really ugly and reeks. In the future we should try to refactor this.

ry

comment created time in 8 days

Pull request review commentdenoland/deno

Implement async module loading in CLI

 pub trait Loader {   } } -// TODO(ry) This is basically the same thing as RustOrJsError. They should be-// combined into one type.-pub enum Either<E> {-  JSError(JSError),-  Other(E),+struct PendingLoad<E: Error> {+  url: String,+  is_root: bool,+  source_code_future: Box<SourceCodeFuture<E>>, }  /// This future is used to implement parallel async module loading without-/// complicating the Isolate API.-pub struct RecursiveLoad<'l, L: Loader> {-  loader: &'l mut L,-  pending: HashMap<String, Box<SourceCodeFuture<<L as Loader>::Error>>>,-  root: String,+/// complicating the Isolate API. Note that RecursiveLoad will take ownership of+/// an Isolate during load.+pub struct RecursiveLoad<L: Loader> {+  loader: Option<L>,+  pending: Vec<PendingLoad<L::Error>>,+  is_pending: HashSet<String>,+  phantom: PhantomData<L>,+  // TODO(ry) The following can all be combined into a single enum State type.+  root: Option<String>,           // Empty before polled.+  root_specifier: Option<String>, // Empty after first poll+  root_id: Option<deno_mod>, } -impl<'l, L: Loader> RecursiveLoad<'l, L> {+impl<L: Loader> RecursiveLoad<L> {   /// Starts a new parallel load of the given URL.-  pub fn new(url: &str, loader: &'l mut L) -> Self {-    let root = L::resolve(url, ".");-    let mut recursive_load = Self {-      loader,-      root: root.clone(),-      pending: HashMap::new(),+  pub fn new(url: &str, loader: L) -> Self {+    Self {+      loader: Some(loader),+      root: None,+      root_specifier: Some(url.to_string()),+      root_id: None,+      pending: Vec::new(),+      is_pending: HashSet::new(),+      phantom: PhantomData,+    }+  }++  fn take_loader(&mut self) -> L {+    self.loader.take().unwrap()+  }++  fn add(+    &mut self,+    specifier: &str,+    referrer: &str,+    parent_id: Option<deno_mod>,+  ) -> Result<String, L::Error> {+    let url = L::resolve(specifier, referrer)?;++    let is_root = if let Some(parent_id) = parent_id {+      let loader = self.loader.as_mut().unwrap();+      let modules = loader.modules();+      modules.add_child(parent_id, &url);+      false+    } else {+      true     };-    recursive_load-      .pending-      .insert(root.clone(), recursive_load.loader.load(&root));-    recursive_load++    if !self.is_pending.contains(&url) {+      self.is_pending.insert(url.clone());+      let source_code_future = {+        let loader = self.loader.as_mut().unwrap();+        loader.load(&url)+      };+      self.pending.push(PendingLoad {+        url: url.clone(),+        source_code_future,+        is_root,+      });+    }++    Ok(url)   } } -impl<'l, L: Loader> Future for RecursiveLoad<'l, L> {-  type Item = deno_mod;-  type Error = Either<L::Error>;+// TODO(ry) This is basically the same thing as RustOrJsError. They should be+// combined into one type.+#[derive(Debug, PartialEq)]+pub enum Either<E> {

This name is not great. EitherError would be better.

ry

comment created time in 8 days

push eventpiscisaureus/deno

Bert Belder

commit sha 19612bd6b0e4b2eecdf4430fc120409616976d0f

Disable tests that run isolate without a task

view details

Bert Belder

commit sha 11d5e5a9932c5255cb6d4e469396994775956ccb

Disable tests that don't work for me

view details

Bert Belder

commit sha 4b9a8c6bd78e80faec5e5da06f436177ba17318c

Remove polled_recently

view details

Bert Belder

commit sha 59eff2a19acbbf3918e989b75bdfa40070df7c0b

Resolving tail latency attempt #2

view details

Bert Belder

commit sha 9fed718fb666568bbebd969c2636bccd701c4a05

Try with more poll repetitions

view details

Bert Belder

commit sha 1678d92ae2396010c4aa53967c9f6ffeb51dfcde

Add very simple eager impl to core http_bench

view details

Bert Belder

commit sha 1061ebdf5ea9f8cd783d47b7d2a3668ba19c1068

Revert "Add very simple eager impl to core http_bench" This reverts commit a86dd7f641ae55bebaaaad981e97d042584a0148.

view details

Bert Belder

commit sha 1f95d792e436492c1384433228be6031b78b492f

Repeat fewer

view details

Bert Belder

commit sha d8053d813a853adf26fef2f14de78d3f4298a678

Simpler

view details

push time in 9 days

push eventpiscisaureus/deno

Bert Belder

commit sha 6098f6e76e531294bc97134bd0975c9ec3e4f0e9

Simpler

view details

push time in 9 days

push eventpiscisaureus/deno

JaePil Jung

commit sha 9cb959ec95fed60f4a5e54fd09a0506fbbe4d9c9

Small fixes in manual.md (#2118)

view details

Bert Belder

commit sha 97f0fe7437ad4277afbdabf6cac214a40b637cd1

third_party: upgrade rust crates

view details

Bert Belder

commit sha 2a01b739e134dd366bb2bbc9a4baa2ae5a61fc57

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha 51d6fac2b19daf1f95983d7ef0f8a395e63597f7

Give ops a name

view details

Bert Belder

commit sha d962cc2fcc1a06066542cb213c726c989a4bd484

First attempt to reduce tail latency

view details

Bert Belder

commit sha 36ee4d2353d1f4fc0d573cbe1ec5724876f558b1

Revert "First attempt to reduce tail latency" This reverts commit bfcd40b151b5b2164bdb2708448fbb28d1677ca3.

view details

Bert Belder

commit sha 95bcc68031a594d651c4103a775b127f7d03b50c

Disable stupid tests that run isolate without a task

view details

Bert Belder

commit sha ea1723283335d7ff7f25eff58dbef057ed5bfa06

Disable tests that don't work for me

view details

Bert Belder

commit sha 341d2f76b2eab8f3a02b63f3a104f3d6886cc23f

Remove polled_recently

view details

Bert Belder

commit sha 037c356f5cdb9b2e296de097860ea510da1dad1f

Resolving tail latency attempt #2

view details

Bert Belder

commit sha 386c1682d80b38dff5c708ef05e74f8bd84c09a1

Try with more poll repetitions

view details

Bert Belder

commit sha b1ea72239254679821ca33fb93f673ef068f53d0

Add very simple eager impl to core http_bench

view details

Bert Belder

commit sha 4792071cfef1bd5f3d8a7b2f456089b5eca2b74e

Revert "Add very simple eager impl to core http_bench" This reverts commit a86dd7f641ae55bebaaaad981e97d042584a0148.

view details

Bert Belder

commit sha f5377e9aad41287f337a84c4553544ac1be7407a

Repeat fewer

view details

push time in 9 days

pull request commentdenoland/deno

Add Deno.core.setGCObserver() for callbacks invoked on GC

Deno.core.setGCObserver(target, handler) sets handler: (target) => void to be invoked on target immediately before being GC-ed e.g. to clear up open resources such as connections.

This is generally speaking not a good idea, except maybe for debugging purposes. The reason is that the GC is "lazy"; it only runs when necessary because of memory pressure. Other types of resources are not considered in the decision making on whether/when the gc runs, so you can't rely on it to do any good.

kevinkassimo

comment created time in 9 days

push eventdenoland/deno_third_party

Bert Belder

commit sha f512ec385aab4eb4c0de75dd1c9bb8c6c5cd14c0

Upgrade rust crates

view details

push time in 9 days

delete branch piscisaureus/deno

delete branch : upgrade_crates

delete time in 9 days

push eventdenoland/deno

Bert Belder

commit sha 97f0fe7437ad4277afbdabf6cac214a40b637cd1

third_party: upgrade rust crates

view details

push time in 9 days

PR merged denoland/deno

third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+146 -149

0 comment

5 changed files

piscisaureus

pr closed time in 9 days

push eventpiscisaureus/deno

JaePil Jung

commit sha 9cb959ec95fed60f4a5e54fd09a0506fbbe4d9c9

Small fixes in manual.md (#2118)

view details

Bert Belder

commit sha 97f0fe7437ad4277afbdabf6cac214a40b637cd1

third_party: upgrade rust crates

view details

push time in 9 days

create barnchpiscisaureus/deno

branch : tokio_hack_backup

created branch time in 9 days

push eventpiscisaureus/deno

Bert Belder

commit sha 7966877f5c9b5537927baa7d316a8536db2dd951

third_party: upgrade rust crates

view details

Bert Belder

commit sha 1dea5b3c69f7e8928f015a2252555c20593bab91

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha b4d952815c7a53574f7282315f04659f4c9532d1

Give ops a name

view details

Bert Belder

commit sha 213bfd05bf7728af79f575e79ca4239df9b21ecc

First attempt to reduce tail latency

view details

Bert Belder

commit sha 7e154d01e04507b407507fb4886d3cd8dcef8990

Revert "First attempt to reduce tail latency" This reverts commit bfcd40b151b5b2164bdb2708448fbb28d1677ca3.

view details

Bert Belder

commit sha 6a75298d46377c82c07ec1842757f69d0e487846

Disable stupid tests that run isolate without a task

view details

Bert Belder

commit sha 56a678e9543a98a82bac733a42532a317c46d8fa

Disable tests that don't work for me

view details

Bert Belder

commit sha db6d57b94405de28530e5a1bda486b02995dfc23

Remove polled_recently

view details

Bert Belder

commit sha 76a2df1bc0c3d5780583e92ed13314ff41665959

Resolving tail latency attempt #2

view details

Bert Belder

commit sha f3c61d79ddcabb55599d79d19ccb633cb355ae4b

Try with more poll repetitions

view details

Bert Belder

commit sha 011d7575081b6470b86f0e37ac0630c596a32009

Add very simple eager impl to core http_bench

view details

Bert Belder

commit sha acabc2a1b693e3e555cbac5a188f326e4e319d75

Revert "Add very simple eager impl to core http_bench" This reverts commit a86dd7f641ae55bebaaaad981e97d042584a0148.

view details

Bert Belder

commit sha 5d70d4965656b6bf94dadc8842fe26da12acecd9

Repeat fewer

view details

push time in 9 days

PR opened denoland/deno

Reviewers
third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+146 -149

0 comment

5 changed files

pr created time in 9 days

create barnchpiscisaureus/deno

branch : upgrade_crates

created branch time in 9 days

create barnchdenoland/deno_third_party

branch : 20190415_upgrade_crates

created branch time in 9 days

push eventpiscisaureus/deno

Bert Belder

commit sha b9f537f9be0a3a48a99fc92d5df0d8a22200dc7d

Revert "Add very simple eager impl to core http_bench" This reverts commit a86dd7f641ae55bebaaaad981e97d042584a0148.

view details

Bert Belder

commit sha 6b23be2ab6c5631eb04fab2201b6a92548d103d9

Repeat fewer

view details

push time in 9 days

push eventpiscisaureus/deno

Bert Belder

commit sha a86dd7f641ae55bebaaaad981e97d042584a0148

Add very simple eager impl to core http_bench

view details

push time in 9 days

push eventpiscisaureus/deno

Bert Belder

commit sha bd1ee034fe392e0f91ba2a112470d0d2e772fb1c

Try with more poll repetitions

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha 8b35177998141498c0b70a1e70f6de4f66acd9e9

Resolving tail latency attempt #2

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha ecd4f50d028bfba20cbcad2a445ac16f7f6e37cd

Disable tests that don't work for me

view details

Bert Belder

commit sha e7598e6d455c8b0c31a8d676d87442b1d0db05cf

Remove polled_recently

view details

Bert Belder

commit sha 6ebeaba00f43d0f5b41d1249f08a69a94d7089e5

Resolving tail latency attempt #2

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha cbb8b190d1cee9a1d8cecc19fa15c5256f5237d7

Resolving tail latency attempt #2

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha b4a5e41d94ed3edacbb383d6c1d5855a1af6bf3a

Disable stupid tests that run isolate without a task

view details

Bert Belder

commit sha c019108bb6e1c1e562e1ebf8417fa1e1413c9858

Disable tests that don't work for me

view details

Bert Belder

commit sha f0f31f7aed3072843bf31409f223ffbb4e4da442

Remove polled_recently

view details

Bert Belder

commit sha e3eb58bbf7664412b1c01bc26f5bcbb859bd543f

Resolving tail latency attempt #2

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha 253d38db9380e1ac4ec4b8dd6a2ba4a381020f2a

Disable stupid tests that run isolate without a task

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha 217db966a196a4225d0e4d10ed97c4f87860747b

Give ops a name

view details

Bert Belder

commit sha ec0ed0c1f3c68db9c4977d4e2751445a8a918cf8

First attempt to reduce tail latency

view details

Bert Belder

commit sha 661c4424307294ca11489acdce5081537b188392

Revert "First attempt to reduce tail latency" This reverts commit bfcd40b151b5b2164bdb2708448fbb28d1677ca3.

view details

Bert Belder

commit sha 161f3f1fb3e6e83d2e27a18d31c2c0898e17a3bd

Remove polled_recently

view details

Bert Belder

commit sha 0e96874aa9418ef34650bca9d413096cc3d876da

Resolving tail latency attempt #2

view details

push time in 10 days

push eventpiscisaureus/deno

Bert Belder

commit sha 6064a97abca30f74c7006e85f11bd72e1e57a77a

Revert "First attempt to reduce tail latency" This reverts commit bfcd40b151b5b2164bdb2708448fbb28d1677ca3.

view details

push time in 10 days

push eventpiscisaureus/deno

Bartek Iwańczuk

commit sha 1034d9723db59b6b7354d6d9804735ebe333d4a1

fix --v8-options (#2093)

view details

andy finch

commit sha 960ee5257a7b38c6b3b59a3dca670c7c1771996f

Improve op dispatch (#2088)

view details

Ryan Dahl

commit sha 8584d80cfd26111825af5a69fc6ae4c367ad0700

v0.3.7

view details

迷渡

commit sha ea1b0519f58887f0019ead942bf3de4490e7bc11

Update `deno -h` output in manual (#2099)

view details

Yoshiya Hinosawa

commit sha e0edcc9c1b025c2b02eb5b50ae7a86089d1c4d61

fix: re-expose DomFile (#2100)

view details

andy finch

commit sha d3bd5879c3b1a26cc09a5374bf2b5ee63071fe29

better wait for removed_from_resource_table_on_close test (#2104)

view details

Bartek Iwańczuk

commit sha 591b5e4a7dfc1c3537c7a2c7091ebe3890271780

Add deno eval subcommand (#2102)

view details

Yoshiya Hinosawa

commit sha 635ad2a18ecd26690e611f54062ae899fe307f96

fix absolute path resolution from remote (#2109)

view details

Ryan Dahl

commit sha a51e78215547f5b10498041a1c58b5fa29c22cbe

Upgrade deno_std (#2111)

view details

tanakaworld

commit sha b413cd5afd6b74b3e50bf6dbb5972ea7df9f34fd

docs: add a pixelated animation logo (#2110)

view details

Ryan Dahl

commit sha c7e1f8fabdc87d3622fd94769c57197d5dfecad3

Fix silent error, add custom panic handler (#2098) This is to work around Tokio's panic recovery feature. Ref https://github.com/tokio-rs/tokio/issues/495 Ref https://github.com/tokio-rs/tokio/issues/209 Ref https://github.com/denoland/deno/issues/1311 Fixes #2097

view details

Bert Belder

commit sha 64fb86c0cf6190d72096e58b71eca03ee10b6ed4

third_party: patch hyper to reduce worst-case response latency

view details

Bert Belder

commit sha 3bea62dd0e05d2081750ef2371c072b18a4bb69f

third_party: fix bug in hyper latency patch

view details

Bert Belder

commit sha 2fe99c43f1f07672a05c101507d248d13abcc800

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha 4dfb8eb3ef9d181cd44360338c06534437f1429c

Give ops a name

view details

Bert Belder

commit sha bfcd40b151b5b2164bdb2708448fbb28d1677ca3

First attempt to reduce tail latency

view details

push time in 10 days

push eventdenoland/deno_third_party

Bert Belder

commit sha d8fb68ccfb72ad6a8b306dfcc3573efafa3c340f

Fix bug in hyper latency patch

view details

push time in 10 days

push eventdenoland/deno

Bert Belder

commit sha 3bea62dd0e05d2081750ef2371c072b18a4bb69f

third_party: fix bug in hyper latency patch

view details

push time in 10 days

PR merged denoland/deno

third_party: fix bug in hyper latency patch

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+1 -1

1 comment

1 changed file

piscisaureus

pr closed time in 10 days

pull request commentdenoland/deno

third_party: fix bug in hyper latency patch

Properly tested this time

piscisaureus

comment created time in 10 days

PR opened denoland/deno

Reviewers
third_party: fix bug in hyper latency patch

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+1 -1

0 comment

1 changed file

pr created time in 10 days

create barnchpiscisaureus/deno

branch : hyper_patch_fix

created branch time in 10 days

create barnchdenoland/deno_third_party

branch : 20190414_hyper_patch_fix

created branch time in 10 days

push eventdenoland/deno_third_party

Bert Belder

commit sha 639be522b158d79f0f712a093403cb532882f7d4

Patch hyper to reduce worst-case response latency

view details

push time in 10 days

push eventdenoland/deno

Bert Belder

commit sha 64fb86c0cf6190d72096e58b71eca03ee10b6ed4

third_party: patch hyper to reduce worst-case response latency

view details

push time in 10 days

PR merged denoland/deno

third_party: patch hyper to reduce worst-case response latency

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+1 -1

0 comment

1 changed file

piscisaureus

pr closed time in 10 days

push eventpiscisaureus/deno

Ryan Dahl

commit sha c7e1f8fabdc87d3622fd94769c57197d5dfecad3

Fix silent error, add custom panic handler (#2098) This is to work around Tokio's panic recovery feature. Ref https://github.com/tokio-rs/tokio/issues/495 Ref https://github.com/tokio-rs/tokio/issues/209 Ref https://github.com/denoland/deno/issues/1311 Fixes #2097

view details

Bert Belder

commit sha 64fb86c0cf6190d72096e58b71eca03ee10b6ed4

third_party: patch hyper to reduce worst-case response latency

view details

push time in 10 days

more