Optimize editor performance for node selection, click target bounds, and batched messages (#3162)

* Don't clone messages during batch processing

* Improve selected nodes perf and memoize network hash computation

* Reuse click target bounding boxes for document bounds

* Early terminate computing the connected count

* Cleanup
This commit is contained in:
Dennis Kobert
2025-09-11 12:08:26 +02:00
committed by GitHub
parent ad5d8fcd37
commit 5836416632
12 changed files with 97 additions and 37 deletions

View File

@@ -333,7 +333,7 @@ impl SnapManager {
return;
}
// We use a loose bounding box here since these are potential candidates which will be filtered later anyway
let Some(bounds) = document.metadata().loose_bounding_box_with_transform(layer, DAffine2::IDENTITY) else {
let Some(bounds) = document.metadata().bounding_box_with_transform(layer, DAffine2::IDENTITY) else {
return;
};
let layer_bounds = document.metadata().transform_to_document(layer) * Quad::from_box(bounds);