DepGraph::previous_work_products is a field in the dep-graph that contains the list of object files cached during the previous compilation session. In theory, this information is available already at the time when we load the previous dep-graph and thus the field could be made immutable (i.e. not use an RwLock) and be initialized at DepGraph construction time.
Refactoring this would need the following steps:
cc @rust-lang/wg-compiler-performance
DepGraph::previous_work_products is a field in the dep-graph that contains the list of object files cached during the previous compilation session. In theory, this information is available already at the time when we load the previous dep-graph and thus the field could be made immutable (i.e. not use an
RwLock) and be initialized atDepGraphconstruction time.Refactoring this would need the following steps:
RwLockaround the DepGraph::previous_work_products field.cc @rust-lang/wg-compiler-performance