mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 12:21:08 +01:00
The Control bar's selection label and the Appearance panel's object row, Mixed Appearances note and shared rows looked up every selected object on every repaint, twice for the label. They are now worked out once for each document, revision and list of appearance subjects (the targeted object, else the selected objects, compared id by id) and reused until one of those changes. The panel's mixed summary is worked out only when the panel is shown. The Control bar no longer copies the selection's ids on each repaint. With 200,000 selected rectangles the two take 2.1 ms of CPU time per repaint instead of 58.4 ms when the rectangles are alike, and 3.0 ms instead of 80.7 ms when every second one has another opacity (selection_summary_perf, an ignored benchmark).