-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Improve incremental compile speed on webrender_api #59650
Copy link
Copy link
Closed
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This was originally filed as a
rustc-perfissue, but I'm moving it here because it's really a rustc issue.The workload in question:
In
rustc-perfparlance, that is a "CleanIncr" build.The 5692 lines of rust code in
webrender_apiexpand to 85511 withcargo expand, largely due toserde, and the expansion phase dominates. So it's basically a stress test for proc macro expansion.#59476 helped a tiny bit. #59507 helped more. The major remaining source of inefficiency is
libproc_macro's buffer for communicating between client and server.Buffer::write_allis called more than a million times, almost always for a single byte, mostly due to uleb128 encoding of integers. @eddyb said they would try to improve that code. I estimate this could save another 10%, maybe more.