diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-04-15 02:07:34 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2019-04-16 22:54:33 +0200 |
commit | 7807afa97274d3b0645d70475fecb37f5dc8ba14 (patch) | |
tree | 593df77e92f009ad39b0a5bc8a29160ab1642f4d /core/js_errors.rs | |
parent | dd595220abed9e4f9dd88e14110eb67f4f5e77be (diff) |
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.
Diffstat (limited to 'core/js_errors.rs')
0 files changed, 0 insertions, 0 deletions