#[non_exhaustive]pub enum SplitDependents {
Optimistic,
Pessimistic,
}Expand description
Which part of a split unit each of its dependents is assumed to need.
Splitting a crate cannot be modelled exactly, because which half a dependent actually needs is not knowable without performing the split. The two variants bracket that unknown rather than guessing at it.
The bracket is often degenerate: at a division fraction of one half the two parts finish at the same instant, so which dependent attaches to which part cannot move any downstream start time and the two answers coincide exactly. That is a property of the model, not a defect, and it is why the dependent assumption is not the only thing a reported interval should be swept over.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Optimistic
Each dependent needs exactly one part, and it is the part that finishes first: the one carrying less of the work, or part a when the two are equal. The best a split could do.
Both parts inherit the same incoming edges and so can start at the same moment, which means the smaller part reaches both its metadata and its end no later than the larger one. Attaching every dependent to it therefore minimises every downstream start time at once, whether an edge waits for metadata or for the whole part. No other assignment gives a shorter critical path, which is what makes this a bound rather than one guess among many.
It is not a plausible refactor: a part that nothing depends on would not be written. It is the limit that a plausible refactor cannot beat.
Pessimistic
Every dependent still needs both parts. The split buys nothing structurally, and only the pipelining boundary moves.