Open
Description
I and others would like to parallelize rustdoc rendering. It is "embarrassingly parallel" ... except that rustdoc has some technical debt in the form of global mutable state that will have to be dealt with first.
Steps
- Get rid of
CURRENT_DEPTH
thread-local (rustdoc: Get rid ofCURRENT_DEPTH
thread-local variable #82742) - Make
Span
etc. Send and Sync - Use
RwLock
instead ofRefCell
forSharedContext
fields (or makeContext
, and by extensionSharedContext
, Send and Sync some other way) - So many more things...
- Add parallelism via MPSC channels and
rayon
cc @rylev @jyn514
cc https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/windows-rs.20perf/near/226957262 (was going to open this issue anyway, but noticed this discussion so thought I'd link to it)
Metadata
Metadata
Assignees
Labels
Category: An issue proposing an enhancement or a PR with one.Call for participation: Hard difficulty. Experience needed to fix: A lot.Issue: Problems and improvements with respect to compile times.Status: Blocked on something else such as an RFC or other implementation work.Relevant to the rustdoc team, which will review and decide on the PR/issue.