Auto merge of #108794 - nnethercote:avoid-unnecessary-hashing, r=cjgillot
Avoid unnecessary hashing I noticed some stable hashing being done in a non-incremental build. It turns out that some of this is necessary to compute the crate hash, but some of it is not. Removing the unnecessary hashing is a perf win. r? `@cjgillot`
This commit is contained in:
commit
150cb38147
10 changed files with 100 additions and 82 deletions
|
@ -297,10 +297,12 @@ pub fn prepare_session_directory(
|
|||
/// renaming it to `s-{timestamp}-{svh}` and releasing the file lock.
|
||||
/// If there have been compilation errors, however, this function will just
|
||||
/// delete the presumably invalid session directory.
|
||||
pub fn finalize_session_directory(sess: &Session, svh: Svh) {
|
||||
pub fn finalize_session_directory(sess: &Session, svh: Option<Svh>) {
|
||||
if sess.opts.incremental.is_none() {
|
||||
return;
|
||||
}
|
||||
// The svh is always produced when incr. comp. is enabled.
|
||||
let svh = svh.unwrap();
|
||||
|
||||
let _timer = sess.timer("incr_comp_finalize_session_directory");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue