mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 09:46:19 +01:00
selected_roots put the selected objects in paint order and dropped the inner ones, two walks of the document, every time a command or an enabled check asked. A rebuild of the menus asks many times for one selection. The roots are now kept on the thread with the document version (held weakly, so its address is not reused) and the selected objects, and found again only when either changes. With 10,000 rectangles selected, a menu rebuild after Select All went from about 500 ms to about 340 ms on the build host.