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

perf(runtime/spawn): collect output using op_read_all #16596

Merged
merged 6 commits into from
Nov 15, 2022

Conversation

marcosc90
Copy link
Contributor

This patch

benchmark      time (avg)             (min … max)       p75       p99      p995
------------------------------------------------- -----------------------------
echo deno   23.99 ms/iter   (22.51 ms … 33.61 ms)  23.97 ms  33.61 ms  33.61 ms
cat 16kb    24.27 ms/iter    (22.5 ms … 35.21 ms)   24.2 ms  35.21 ms  35.21 ms
cat 1mb     25.88 ms/iter   (25.04 ms … 30.28 ms)  26.12 ms  30.28 ms  30.28 ms
cat 15mb    38.41 ms/iter       (35.7 ms … 50 ms)  38.31 ms     50 ms     50 ms

main

benchmark      time (avg)             (min … max)       p75       p99      p995
------------------------------------------------- -----------------------------
echo deno   35.66 ms/iter   (34.53 ms … 41.84 ms)  35.79 ms  41.84 ms  41.84 ms
cat 16kb    35.99 ms/iter   (34.52 ms … 44.94 ms)  36.05 ms  44.94 ms  44.94 ms
cat 1mb     38.68 ms/iter   (36.67 ms … 50.44 ms)  37.95 ms  50.44 ms  50.44 ms
cat 15mb     48.4 ms/iter   (46.19 ms … 58.41 ms)  49.16 ms  58.41 ms  58.41 ms

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

@marcosc90 Can you drop the benchmark source somewhere in cli/bench?

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

I think LGTM! Thanks.

@littledivy
Copy link
Member

@lucacasonato can you take a look? 🙏

@marcosc90
Copy link
Contributor Author

@marcosc90 Can you drop the benchmark source somewhere in cli/bench?

Done @littledivy

@marcosc90
Copy link
Contributor Author

marcosc90 commented Nov 14, 2022

command_test.ts tests are flaky (or broken) in main

https://github.com/denoland/deno/actions/runs/3457193770/jobs/5770460515#step:34:3397

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Some minor comments. Looks great overall.

@@ -767,16 +768,24 @@
return stream;
}

function readableStreamUnrefable(stream) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function readableStreamUnrefable(stream) {
function readableStreamIsUnrefable(stream) {

Comment on lines 4606 to 4607
const _resourceBacking = Symbol("[[resourceBacking]]");
const _resourceBackingUnrefable = Symbol("[[resourceBackingUnrefable]]");
Copy link
Member

Choose a reason for hiding this comment

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

This distinction exists to prevent unrefable streams being used in regular fast streams that are unaware of refability? Please add a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, added the comment.

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, thank you @marcosc90!

@bartlomieju bartlomieju merged commit 0832ba1 into denoland:main Nov 15, 2022
@marcosc90 marcosc90 deleted the perf-spawn-output branch November 15, 2022 19:01
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.

4 participants