-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: Use FxHashMap from rustdoc_json_types #129124
Conversation
@bors try |
rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing |
rustdoc-json: Use FxHashMap from rustdoc_json_types Alternative to rust-lang#110051 and rust-lang#127456. This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead. For the rustdoc-type republish on crates.io, I'll filter out the `pub use`, and not change the API at all. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`) try-job: dist-arm-linux r? `@GuillaumeGomez`
Thanks! r=me once CI pass |
Oh very nice, I bet this will have a measurable perf impact on large crates! 🙌 |
☀️ Try build successful - checks-actions |
@bors r=GuillaumeGomez |
…llaumeGomez rustdoc-json: Use FxHashMap from rustdoc_json_types Alternative to rust-lang#110051 and rust-lang#127456. This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead. For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. rust-lang/rustdoc-types#30. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`) try-job: dist-arm-linux r? `@GuillaumeGomez`
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#128348 (Unconditionally allow shadow call-stack sanitizer for AArch64) - rust-lang#128922 (rust-analyzer: use in-tree `pattern_analysis` crate) - rust-lang#128935 (More work on `zstd` compression) - rust-lang#129072 (Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return) - rust-lang#129101 (Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass) - rust-lang#129106 (Remove redundant type ops: `Eq`/`Subtype`) - rust-lang#129122 (Remove duplicated `Rustdoc::output` method from `run-make-support` lib) - rust-lang#129124 (rustdoc-json: Use FxHashMap from rustdoc_json_types) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128348 (Unconditionally allow shadow call-stack sanitizer for AArch64) - rust-lang#129065 (Use `impl PartialEq<TokenKind> for Token` more.) - rust-lang#129072 (Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return) - rust-lang#129096 (Print more verbose error for commands that capture output) - rust-lang#129101 (Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass) - rust-lang#129106 (Remove redundant type ops: `Eq`/`Subtype`) - rust-lang#129122 (Remove duplicated `Rustdoc::output` method from `run-make-support` lib) - rust-lang#129124 (rustdoc-json: Use FxHashMap from rustdoc_json_types) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129124 - aDotInTheVoid:rdj-hashmap-3, r=GuillaumeGomez rustdoc-json: Use FxHashMap from rustdoc_json_types Alternative to rust-lang#110051 and rust-lang#127456. This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead. For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. rust-lang/rustdoc-types#30. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`) try-job: dist-arm-linux r? ``@GuillaumeGomez``
homu, chill. @bors r- |
Alternative to #110051 and #127456.
This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.
For the rustdoc-type republish on crates.io, It will filter out the
pub use
, and not change source at all. rust-lang/rustdoc-types#30. That code already replaces the hashmap to use the one instd::collections
(instead ofFxHashMap
)try-job: dist-arm-linux
r? @GuillaumeGomez