Description
There is a crate inside of Fuchsia whose compile times increased from ~500ms to ~120s in the last month of Rust compiler updates. It hasn't been easy so far to provide a minimal example, but I will keep working at it.
Some bisecting revealed that it actually consisted of two performance regressions, both affecting the time spent in check_mod_item_types
:
Commit hash | Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
---|---|---|---|---|---|---|---|
87b0c90 | check_mod_item_types | 34.92ms | 7.120 | 6 | 0 | 0.00ns | 0.00ns |
34e82a7 | check_mod_item_types | 21.92s | 97.786 | 6 | 0 | 0.00ns | 0.00ns |
66bf391 | check_mod_item_types | 21.76s | 97.838 | 6 | 0 | 0.00ns | 0.00ns |
0221e26 | check_mod_item_types | 133.53s | 99.526 | 6 | 0 | 0.00ns | 0.00ns |
The first regression occurred in the rollup #64354, and the second occurred sometime in the two weeks between changes 66bf391..0221e26.
There is heavy use of async/await in the code, and I've identified a couple places where taking out .await
makes the compile finish right away. This makes me suspect #64292 for the first regression, but I'm not sure.
I'll update the issue as I have more information.