Don't process cycles when stalled

This improves the `inflate-0.1.0` benchmark by about 10% for me.
This commit is contained in:
Jonas Schievink 2016-10-17 02:28:31 +02:00
parent 6dc035ed91
commit 88fde7f728

View File

@ -342,6 +342,16 @@ impl<O: ForestObligation> ObligationForest<O> {
}
}
if stalled {
// There's no need to perform marking, cycle processing and compression when nothing
// changed.
return Outcome {
completed: vec![],
errors: errors,
stalled: stalled,
};
}
self.mark_as_waiting();
self.process_cycles(processor);