mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 02:35:37 +01:00
While an interaction is open (a move, scale or shape drag, a dialog's preview, a typing session), the menus' state key left the document revision out, so the key changed in the frame the interaction began and the menus rebuilt every row's state for it, on top of the rebuilds for the press and the release. A rebuild costs about 8 ms on small documents and about 160 ms with 10,000 objects selected. An interaction now records the revision it began from, and the key uses that revision while the interaction is open. The key stays the same as a drag begins and through its previews, and changes when it ends. The new test drives a Selection tool move through the whole app and counts the rebuilds in each frame: one for the press and one for the release, none as the move begins.