Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(deno/core): Move buffer_ops to deno core & merge logic with json_ops #9457

Merged
merged 7 commits into from
Mar 20, 2021
Merged

refactor(deno/core): Move buffer_ops to deno core & merge logic with json_ops #9457

merged 7 commits into from
Mar 20, 2021

Conversation

inteon
Copy link
Contributor

@inteon inteon commented Feb 9, 2021

This PR is an effort to allow for more general js <-> rs message passing. It fixes #8173, by moving minimal ops to deno core.
This new system can be used to efficiently send and receive array-buffer messages (like minimal ops), but allso allows to return messages of arbitrary length (can be used for worker communication).

@inteon
Copy link
Contributor Author

inteon commented Feb 25, 2021

Used by #9323.
On my local machine benchmarks seem to be comparable with performance before change, but I would appreciate it if someone can confirm this.

@inteon inteon marked this pull request as ready for review February 25, 2021 17:03
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inteon there a lot going on in this PR. In general I think these changes are desirable, but to be honest it's quite hard to approve this PR with confidence as it touches as lot of critical infrastructure. Could you maybe split it into two smaller PRs? First which reorganizes file by moving existing implementation of "minimal ops" to "core/", and second which unifies implementation between "json" and "buffer" ops.

@inteon
Copy link
Contributor Author

inteon commented Mar 6, 2021

@bartlomieju I'll see what I can do. I plan to work on this tomorrow.

@inteon inteon changed the title refactor(deno/core): Move dispatch_ops to deno core & rewrite refactor(deno/core): Move buffer_ops to deno core & merge logic with json_ops Mar 16, 2021
@inteon inteon requested a review from bartlomieju March 18, 2021 23:15
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inteon looks great, could you rewrite core/examples/http_bench_bin_ops.rs to use this new dispatch?

core/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks you @inteon, very nice cleanup. As with previous PRs I will be monitoring benchmarks after landing and if there's a noticeable impact I will revert to look for bottlenecks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dispatch_minimal should use promise table from Deno.core
2 participants