Merge pull request #8267 from dotCooCoo/perf/select-same-parent-walk

Select: Same and Select by Color read each object's parent from the walk
This commit is contained in:
BFlat
2026-11-17 09:48:26 +07:00
committed by GitHub
4 changed files with 491 additions and 34 deletions
+1
View File
@@ -1528,6 +1528,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
Select › Same › Text Fill & Stroke Color selects the type whose characters match both the fill and the stroke of the selected type (`select.same.textFillAndStrokeColor`). The menu entry is listed in [Select objects by characteristics](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/select-objects-by-characteristics.html); requiring one run of characters to match both is VectorCraft's own behavior.
The Select › Same font and text color commands take the type to match from the selected type that can be selected: type that is hidden or locked, on a template layer, or outside the isolated group is passed over. This is VectorCraft's own behavior.
Select › Same › Fill Color, Stroke Color, Fill & Stroke, Stroke Weight, Opacity, Blending Mode, Appearance, Shape, Graphic Style, Appearance Attribute and Symbol Instance compare the other objects with the first selected object that can be selected, of any kind: an object that is hidden or locked, on a template layer, on a locked artboard while nothing is isolated (except new art while it stays selected), or outside the isolated group is passed over. This is VectorCraft's own behavior.
Select › Same, Select by Color (`select.color`) and `document.find` read the object that holds each object they check from their walk of the document, instead of looking it up by id for each object. They select the same objects as before. On a document of 220,482 objects, the search of Select › Same › Fill Color takes a median of 24 ms of CPU time instead of 83 ms in a release build on Linux, and of Stroke Color 22 ms instead of 60 ms (seven alternating runs, `cargo test --release -p vectorcraft-engine --lib select_same_perf -- --ignored --nocapture`).
Select › Object › All on Same Layers takes the layers only of the selected objects that can be selected: an object that is hidden or locked, on a template layer, on a locked artboard while nothing is isolated, or outside the isolated group adds no layer. This is VectorCraft's own behavior.
Object › Flatten Transparency takes a frame of threaded text out of the thread in the same way when Convert All Text to Outlines outlines it or when the frame becomes flat regions or an image, and the other frames keep the text they hold.
Object › Flatten Transparency, the Flattener Preview, and EPS, PDF and print output that flatten transparency stop building a group's flat regions at the first region past the raster/vector balance's limit (10^(balance/20), rounded down) and rasterize the whole group without building the remaining regions. Building every region gives the same flattened art and the same files. With Clip Complex Regions on, a group builds every region and its image is clipped to them.