mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 13:33:51 +00:00
The Blend panel, the Object › Blend, Envelope Distort and Gradient Mesh menu items and their commands looked up every ancestor of each selected object by id to find its nearest blend, envelope or mesh, and dropped repeats with a linear scan. They now read the object's cached place in the tree once, test the nodes on that path, and keep a set of the ones already listed. The checks of whether one is selected stop at the first selected object that has one. An id that the lookup cache does not place on that path (a repeated id, or a cache older than the tree) is still looked up by id, so the results, their order and the errors are the same. Explicit ids given to the live commands drop nested ones with a set as well. With Select All of 102,200 objects (100,000 rectangles, 2,000 blends and 200 envelopes), a release build took a median of 16.5 ms of thread CPU time for the Blend check before and 0.5 ms after.