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

rustdoc-json: buffer output #93954

Merged
merged 1 commit into from
Feb 19, 2022
Merged

Conversation

aDotInTheVoid
Copy link
Member

@aDotInTheVoid aDotInTheVoid commented Feb 13, 2022

It turns out we were doing syscalls for each part of the json syntax

Before:

...
[pid 1801267] write(5, "\"", 1)         = 1
[pid 1801267] write(5, ",", 1)          = 1
[pid 1801267] write(5, "\"", 1)         = 1
...

After:

[pid 1974821] write(5, "{\"root\":\"0:0\",\"crate_version\":nu"..., 1575) = 1575

In one benchmark (one struct, almost all time in std), this gives ~2x perf

r? @CraftSpider

@rustbot modify labels: +A-rustdoc-json +T-rustdoc -A-testsuite

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 13, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 13, 2022
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc and removed A-testsuite Area: The testsuite used to check the correctness of rustc labels Feb 13, 2022
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=never (perf?)

@bors
Copy link
Contributor

bors commented Feb 15, 2022

📌 Commit ae15822 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 15, 2022
@bors
Copy link
Contributor

bors commented Feb 15, 2022

⌛ Testing commit ae15822 with merge 8859ab012852ee4bcb88a3deb3abe1b5c7a35794...

@bors
Copy link
Contributor

bors commented Feb 15, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 15, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@aDotInTheVoid
Copy link
Member Author

@aDotInTheVoid
Copy link
Member Author

@bors retry

@bors
Copy link
Contributor

bors commented Feb 16, 2022

@aDotInTheVoid: 🔑 Insufficient privileges: not in try users

@CraftSpider
Copy link
Contributor

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2022
@Mark-Simulacrum
Copy link
Member

@bors rollup=maybe

I don't think this is likely to affect perf in practice, so let's permit rolling it up.

@aDotInTheVoid
Copy link
Member Author

It only effects perf on the rustdoc json backend, which we currently dont track perf for, but we should

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#92902 (Improve the documentation of drain members)
 - rust-lang#93658 (Stabilize `#[cfg(panic = "...")]`)
 - rust-lang#93954 (rustdoc-json: buffer output)
 - rust-lang#93979 (Add debug assertions to validate NUL terminator in c strings)
 - rust-lang#93990 (pre rust-lang#89862 cleanup)
 - rust-lang#94006 (Use a `Field` in `ConstraintCategory::ClosureUpvar`)
 - rust-lang#94086 (Fix ScalarInt to char conversion)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 554aea9 into rust-lang:master Feb 19, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 19, 2022
@aDotInTheVoid aDotInTheVoid deleted the json-buffer branch February 21, 2023 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants