You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our IndexedCrate type builds a variety of indexes based on the underlying rustdoc crate.
Rustdoc crates' JSON can be ~450MB in size for particularly large crates, so our indexes can be significant in size too. They could probably be built in parallel using rayon.
We don't want to requirerayon, since that may not be suitable for all use cases. But we should offer it as a non-default option in case the performance improvement is worth it. For example, cargo-semver-checks would enable it, whereas the rustdoc Trustfall playground would probably not enable it.
Required steps:
add optional rayon feature
adjust CI to run tests both with and without the feature, so both configurations are known correct
implement rayon parallelization for index-building
benchmark (on your own machine) how much faster rayon makes IndexedCrate::new() on the rustdoc JSON of a large crate like aws-sdk-ec2
to generate rustdoc JSON, clone that repo, cd into the crate's directory, and use the RUSTDOCFLAGS="-Z unstable-options --document-private-items --document-hidden-items --output-format=json --cap-lints=allow" cargo doc --lib --no-deps shell command which will put aws-sdk-ec2.json into the target/doc directory of the workspace
This is a good first issue for someone who is already familiar with Rust, somewhat familiar with rayon, and wants to start contributing to this project. It is not a good first issue for folks new to Rust, since it requires understanding advanced Rust concepts such as Send + Sync auto-traits etc.
Comment to temporarily claim the issue, in case multiple people are interested in it!
The text was updated successfully, but these errors were encountered:
Our
IndexedCrate
type builds a variety of indexes based on the underlying rustdoc crate.Rustdoc crates' JSON can be ~450MB in size for particularly large crates, so our indexes can be significant in size too. They could probably be built in parallel using
rayon
.We don't want to require
rayon
, since that may not be suitable for all use cases. But we should offer it as a non-default option in case the performance improvement is worth it. For example,cargo-semver-checks
would enable it, whereas the rustdoc Trustfall playground would probably not enable it.Required steps:
rayon
featurerayon
parallelization for index-buildingrayon
makesIndexedCrate::new()
on the rustdoc JSON of a large crate likeaws-sdk-ec2
cd
into the crate's directory, and use theRUSTDOCFLAGS="-Z unstable-options --document-private-items --document-hidden-items --output-format=json --cap-lints=allow" cargo doc --lib --no-deps
shell command which will putaws-sdk-ec2.json
into thetarget/doc
directory of the workspaceThis is a good first issue for someone who is already familiar with Rust, somewhat familiar with
rayon
, and wants to start contributing to this project. It is not a good first issue for folks new to Rust, since it requires understanding advanced Rust concepts such asSend + Sync
auto-traits etc.Comment to temporarily claim the issue, in case multiple people are interested in it!
The text was updated successfully, but these errors were encountered: