Files
vectorcraft/crates/engine
dotCooCoo 698ec93090 Select: removing objects one at a time checks and reads only the removed ones
Taking objects out of a selection (select.toggle, which Shift-click, the
Layers panel and a script's selected = false run) checked the whole
selection again, walking the tree once it held more than an eighth of the
document, and read every selected object's paints for the fill and stroke
proxies. Deselecting N objects one at a time took O(N^2) lookups.

Session::select now checks only the objects that follow the objects it
already checked, kept in their order, so a removal needs no checks. The
selection's paints keep counts (the first fill, stroke and weight met,
how many match it, and how many there are), so the objects that leave are
taken out of them and the objects that join are read. The paints are read
again when every value matching the first one is gone and others are left,
or when that takes fewer lookups.
2026-11-27 13:37:08 -08:00
..