-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Description
This was originally filed as a rustc-perf issue, but I'm moving it here because it's really a rustc issue.
The workload in question:
cd webrender/webrender_api && cargo check && touch color.rs && cargo check
In rustc-perf parlance, that is a "CleanIncr" build.
The 5692 lines of rust code in webrender_api expand to 85511 with cargo expand, largely due to serde, 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_all is 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.