We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fc3700 commit 0c5f6f0Copy full SHA for 0c5f6f0
src/cargo/core/compiler/job_queue.rs
@@ -880,10 +880,17 @@ impl<'cfg> DrainState<'cfg> {
880
};
881
882
match fresh {
883
- Freshness::Fresh => self.timings.add_fresh(),
884
- Freshness::Dirty => self.timings.add_dirty(),
+ Freshness::Fresh => {
+ self.timings.add_fresh();
885
+ // Running a fresh job on the same thread is often much faster than spawning a new
886
+ // thread to run the job.
887
+ doit();
888
+ }
889
+ Freshness::Dirty => {
890
+ self.timings.add_dirty();
891
+ scope.spawn(move |_| doit());
892
893
}
- scope.spawn(move |_| doit());
894
895
Ok(())
896
0 commit comments