mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 02:07:10 +01:00
Document::node went through index_path, which copied the node's index path out of the lookup cache into a new Vec, walked the tree to check it, and walked it again to return the node. The menus' states call it for every selected object in many of their checks, so a rebuild of the menu states with 10,000 objects selected made hundreds of thousands of copies. node now follows the place the cache has for the id once, without a copy. When the cache has no single place for it, the path is deeper than 32 levels, or the node there no longer has the id, it looks the node up as index_path does. vectorcraft_doc::path_copies counts the paths the cache copies out, for the new test.