Age | Commit message (Collapse) | Author |
|
|
|
|
|
This is a rewrite of the `Deno.serve` API to live on top of hyper
1.0-rc3. The code should be more maintainable long-term, and avoids some
of the slower mpsc patterns that made the older code less efficient than
it could have been.
Missing features:
- `upgradeHttp` and `upgradeHttpRaw` (`upgradeWebSocket` is available,
however).
- Automatic compression is unavailable on responses.
|
|
Fixes https://github.com/denoland/deno/issues/18775
|
|
|
|
(#18587)
https://github.com/littledivy/fastwebsockets
```
# This PR
./load_test 100 0.0.0.0 8080 0 0
Running benchmark now...
Msg/sec: 176355.000000
# main
./load_test 100 0.0.0.0 8080 0 0
Running benchmark now...
Msg/sec: 157198.750000
```
|
|
Use u16 to represent the kind of event (0 - 6) & event code > 6 is
treated as the close code. This way we can represent all events + the
close code in a single JS number. This is safe because (as per RFC 6455)
close code from 0-999 are reserved & not used.
| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno #18506 | `140079.000000` |
| deno #18506 + this | `150104.250000` |
|
|
Easy perf win by avoiding deserializing `SendValue` through serde_v8.
| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno_this | `140079.000000` |
|
|
Similar to #18506 but for Text frames.
|
|
`http` is very stable, it's safe to "unpin" it from `=0.28.0` version.
This helps embedders that depend on newer version of `http` crate.
|
|
Follow-up to #18210:
* we are passing the generated `cfg` object into the state function
rather than passing individual config fields
* reduce cloning dramatically by making the state_fn `FnOnce`
* `take` for `ExtensionBuilder` to avoid more unnecessary copies
* renamed `config` to `options`
|
|
(#18210)
This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements:
* `deno_core::ops!` registers a block of `#[op]`s, optionally with type
parameters, useful for places where we share lists of ops
* `deno_core::extension!` is used to register an extension, and creates
two methods that can be used at runtime/snapshot generation time:
`init_ops` and `init_ops_and_esm`.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
This commit splits "<ext_name>::init" functions into "init_ops" and
"init_ops_and_esm". That way we don't have to construct list of
ESM sources on each startup if we're running with a snapshot.
In a follow up commit "deno_core" will be changed to not have a split
between "extensions" and "extensions_with_js" - it will be embedders'
responsibility to pass appropriately configured extensions.
Prerequisite for https://github.com/denoland/deno/pull/18080
|
|
Prerequisite for https://github.com/denoland/deno/pull/18080
|
|
There's no point for this API to expect result. If something fails it should
result in a panic during build time to signal to embedder that setup is
wrong.
|
|
|
|
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
This reverts commit 36307c45
|
|
|
|
Yearly tradition of creating extra noise in git.
|
|
Reverts denoland/deno#16743
This fixes the server hangs we were seeing in benchy. cc @billywhizz
|
|
This reverts commit d76014192dbfd134794a6129e73f38645d7e6314.
|
|
Closes https://github.com/denoland/deno/issues/16450
|
|
Fixes #16450
|
|
Towards https://github.com/denoland/deno/issues/16315
|
|
Towards #16315
|
|
stream (#16004)
|
|
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
|
|
|
|
|
|
|
|
This reverts commit 4e3ed37037a2aa1edeac260dc3463a81d9cf9b88.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
Also cleanup & drop ignored wildcard op-args
|
|
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
|
|
|
|
|
|
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
|
|
WebSocket (#13172)
|
|
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
|
|
also move create_http_client to deno_fetch
|
|
Fix a bad resource ID error when aborting a WebSocketStream immediately
after its creation.
|
|
Fixes: #12193
Fixes: #12251
Closes: #12714
|
|
(#12704)
This reverts commit 5b1e537446454f6332de44adbeb6a15ff072c2fa.
|
|
Fixes: #12193
|