Delete: in a rolled-back history, the check builds the history once when nothing breaks (#9917) (#9972)
* Delete: the check in a rolled-back history builds the history once when nothing breaks (#9917) With the history rolled back, the check before a delete (which features the delete would break) built the whole history twice, before and after the change, with the marker removed. On a large design each build ran every boolean after the marker: deleting twelve splines took half a minute on the window thread. Only a feature that fails after the change can be newly broken, so the history after it is built first, and when nothing fails there the history before it isn't built at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Delete: test that the check in a rolled-back history still reports what breaks (#9917) Deleting a hole in the plate changes the plate and every cut after the marker and breaks none of them: the check reports nothing. Deleting a side of the outline breaks the plate, and the check still says so, with a cache too small to keep a state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c512c8e86a
commit
d4eeedbf95
2 files changed
+38
-1
No files matched your search
@@ -1353,7 +1353,14 @@ pub(super) fn newly_broken_in_history(
|
||||
model.evaluate(&doc);
|
||||
model
|
||||
};
|
||||
newly_broken(&whole(before_doc, before), &whole(after_doc, after))
|
||||
// Only a feature that fails after the change can be newly broken: when none does, the
|
||||
// history before it needn't be built again (#9917: each build ran every boolean after the
|
||||
// marker, half a minute on a large design).
|
||||
let after = whole(after_doc, after);
|
||||
if after.results.iter().all(|r| r.error.is_none()) {
|
||||
return Vec::new();
|
||||
}
|
||||
newly_broken(&whole(before_doc, before), &after)
|
||||
}
|
||||
|
||||
/// Whether `after_doc` differs from `before_doc` only in sketch constraints and dimensions (and
|
||||
|
||||
Reference in new issue
Block a user