Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
Changes "deno --types" to "deno types"
and "deno --prefetch" to "deno prefetch"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
And rename IsolateState to ThreadSafeState.
Also make ThreadSafeState directly implement Dispatch. This is simpler.
|
|
Also use a VecDeque to store pending ops to avoid exponential time complexity
when removing completed ops from the list.
|
|
* Moves how snapshots are supplied to the Isolate. Previously they were
given by Behavior::startup_data() but it was only called once at
startup. It makes more sense (and simplifies Behavior) to pass it to the
constructor of Isolate.
* Adds new libdeno type deno_snapshot instead of overloading
deno_buf.
* Adds new libdeno method to delete snapshot deno_snapshot_delete().
* Renames deno_get_snapshot() to deno_snapshot_new().
* Makes StartupData hold references to snapshots. This was implicit when
it previously held a deno_buf but is made explicit now. Note that
include_bytes!() returns a &'static [u8] and we want to avoid
copying that.
|
|
|
|
|
|
And model worker resources as Stream
|
|
|
|
|
|
|
|
* Refactored the way worker polling is scheduled and errors are handled.
* Share the worker future as a Shared
|
|
|
|
So we don't have to have an optional tokio dependency. We build
deno_core_http_bench using GN anyway.
|
|
|
|
|
|
Fixes some sed errors introduced in c43cfe.
Unfortunately moving libdeno required splitting build.rs into two parts,
one for cli and one for core.
I've also removed the arm64 build - it's complicating things at this
re-org and we're not even testing it. I need to swing back to it and get
tools/test.py running for it.
|
|
|
|
|
|
|
|
|
|
|
|
This simplifies the Behavior trait and makes it more explicit where the
resolve callback is being made.
Also s/StartupScript/Script
|
|
Fixes #1988
|
|
|
|
Re-enables arm64 CI test
|
|
This disables a few tests which are broken still:
- tests/error_004_missing_module.test
- tests/error_005_missing_dynamic_import.test
- tests/error_006_import_ext_failure.test
- repl_test test_set_timeout
- repl_test test_async_op
- repl_test test_set_timeout_interlaced
- all of permission_prompt_test
|
|
|
|
We always pass around Box<[u8]>, and adding this generic is an
unnecessary complication.
Add deno_core_http_bench_test to test.py
sharedQueue works on deno_core_http_bench
|
|
|
|
* Privatize a few deno_core::Isolate methods
* Add deno_core::Isolate docs
|
|
Move v8_set_flags and v8_version to core. (The idea is that src/ should
not depend on libdeno.rs anymore. This is a step towards that.)
|
|
|
|
src/js_errors.rs takes care of source maps and color while
core/js_errors.rs is just the basic struct.
|
|
|
|
This aids development using Visual Studio Code. The http_bench can't be
built with cargo yet because it needs to link with libdeno.
|