-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[rustdoc] Simplify module rendering and HTML tags handling #148021
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
Conversation
|
I don't think it will have an impact on perf but just in case... @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[rustdoc] Simplify module rendering and HTML tags handling
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (3f89e8c): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.3%, secondary -4.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 474.933s -> 474.295s (-0.13%) |
|
Close to no changes, so all good. :) |
|
If you use FxIndexMap instead, does that have any effect on the perf? That would let you get rid of all the query instability annotations. |
|
Worth a try! @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[rustdoc] Simplify module rendering and HTML tags handling
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (d7aa67f): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 4.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -6.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 476.496s -> 477.411s (0.19%) |
|
@bors r+ rollup |
Rollup of 5 pull requests Successful merges: - #148016 (Revert constification of `Borrow` and `Deref for Cow` due to inference failure) - #148021 ([rustdoc] Simplify module rendering and HTML tags handling) - #148039 (Add myself to the review rotation) - #148042 (test(frontmatter): Cover spaces between infostring parts) - #148054 (Streamline iterator chaining when computing successors.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #148021 - GuillaumeGomez:simplify-mod-render, r=notriddle [rustdoc] Simplify module rendering and HTML tags handling Extracted code from #145458. This PR simplifies the rendering of modules, in particular the HTML tags handling. Instead of having all items in a `vec`, we make a map with their types as key, allowing to then iterate over the types, which allows us to open and close the HTML tag at every turn without the need to check if a tag was opened or not, or to check it's still the same kind of type. For a better review experience: enable "Hide whitespace", the diff will be much smaller. r? `@notriddle`
|
Bors hasn't noticed that this was merged. @bors r- |
Extracted code from #145458.
This PR simplifies the rendering of modules, in particular the HTML tags handling. Instead of having all items in a
vec, we make a map with their types as key, allowing to then iterate over the types, which allows us to open and close the HTML tag at every turn without the need to check if a tag was opened or not, or to check it's still the same kind of type.For a better review experience: enable "Hide whitespace", the diff will be much smaller.
r? @notriddle