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 regression for doc generation from rollup 90416 #90512

Open
pnkfelix opened this issue Nov 2, 2021 · 6 comments
Open

perf regression for doc generation from rollup 90416 #90512

pnkfelix opened this issue Nov 2, 2021 · 6 comments
Labels
I-slow Issue: Problems and improvements with respect to performance of generated code. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Nov 2, 2021

Spawned off of #90416 (comment)

34 doc benchmarks regressed by 1% or more.

@pnkfelix pnkfelix added I-slow Issue: Problems and improvements with respect to performance of generated code. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 2, 2021
@pnkfelix
Copy link
Member Author

pnkfelix commented Nov 2, 2021

(spoke to @GuillaumeGomez , who hypothesizes based on the contents of Pull Request #90416 that this is a spurious regression.)

@camelid
Copy link
Member

camelid commented Nov 2, 2021

I wonder if it's possible that something in rustc changed that is only used by rustdoc, so the regression only showed up in doc builds?

@camelid
Copy link
Member

camelid commented Nov 2, 2021

I looked through the rollup diff. None of the compiler changes (and certainly not the rustdoc) changes jump out at me as potentially causing this regression. #90377 doesn't seem likely either, since I don't think it'd affect rustdoc differently from the compiler.

However, I wonder if the regression could be due to #89876. It makes some core internal macros more complex and adds attributes to a bunch of core traits, which could be slowing rustdoc down (especially since impls and traits are one of the slowest parts of rustdoc). It still seems like a bit of a stretch though to cause such huge regressions.

Also, the most significant regressions are for doc builds, but there are non-trivial regressions on check (and maybe other) builds too (EDIT: the check regressions show up even with "Filter out very small changes" checked):

image

@jyn514
Copy link
Member

jyn514 commented Nov 2, 2021

I wonder if it makes sense not to investigate too heavily for helloworld regressions. Rustdoc has lots of global analysis which I've been meaning to look at to see if it's truly necessary, but I don't think there's much we can do to avoid regressions like this in the short-term.

@camelid
Copy link
Member

camelid commented Nov 2, 2021

I wonder if it makes sense not to investigate too heavily for helloworld regressions.

I agree about helloworld, but real-world crates regressed a lot too. E.g., ripgrep and futures regressed by about 1.75%.

@camelid
Copy link
Member

camelid commented Nov 9, 2021

Looking at the query diff view, build_extern_trait_impl and metadata_decode_entry_item_attrs both seem to have regressed by several percentage points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-slow Issue: Problems and improvements with respect to performance of generated code. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants