Rustdoc: Very long doc compile times (95%+ taken by render_html)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I've recently tried to build rustdocs in one of our projects, and I've noticed some very odd 1h+ compile times for the docs (see the attached profile) with a majority of the time taken by the render_html item in the flamegraph. Also, during that time only a single core is pinned to 100%, even though multiple cores are available. (I don't know if rustdoc is multithreaded in that stage so if it is not that should be as expected)
My question now is: Is this expected behavior? If not, or if you need more information, I can try to create a minimum example that is able to reproduce this issue if that is something someone wants :)
(since the .mm_profdata file is too big I uploaded it to google drive instead :) )
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the attached flamegraph and .mm_profdata profile, focusing on rustdoc's render_html stage. Reproduce the report with a minimized example if possible, then determine whether the long compile time and single-core usage are expected. Done means a confirmed diagnosis with a targeted fix or documented explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100