MapDataProvider.canvasObjectsUnderCollection sweeps _collectionParentOf to a fixpoint and then filters every canvas object by _imageParentOf, so it costs roughly O(collections × sweeps + canvasObjects) per call.
regeneratePrefabInstance calls it once per instance, and regenerateAllInstancesOfPrefab calls that once per instance of the prefab. So editing a prefab's master, or attaching a script to it, walks the whole collection tree and the whole canvas-object list once for every live instance.
Irrelevant at current scale — a handful of prefabs and a few dozen canvas objects. Filing it because it's the first place to look if stamped prefabs get used heavily on a large map. A spider map with a stamped panel per stop is the shape that would hit it hardest, since that's many instances of one prefab all regenerating together.
Cheapest fix is probably memoising the descendant set per master collection and invalidating on hierarchy change, rather than making the sweep itself cleverer. Introduced alongside the stamp path in #35.
`MapDataProvider.canvasObjectsUnderCollection` sweeps `_collectionParentOf` to a fixpoint and then filters every canvas object by `_imageParentOf`, so it costs roughly O(collections × sweeps + canvasObjects) per call.
`regeneratePrefabInstance` calls it once per instance, and `regenerateAllInstancesOfPrefab` calls that once per instance of the prefab. So editing a prefab's master, or attaching a script to it, walks the whole collection tree and the whole canvas-object list once for every live instance.
Irrelevant at current scale — a handful of prefabs and a few dozen canvas objects. Filing it because it's the first place to look if stamped prefabs get used heavily on a large map. A spider map with a stamped panel per stop is the shape that would hit it hardest, since that's many instances of one prefab all regenerating together.
Cheapest fix is probably memoising the descendant set per master collection and invalidating on hierarchy change, rather than making the sweep itself cleverer. Introduced alongside the stamp path in #35.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
MapDataProvider.canvasObjectsUnderCollectionsweeps_collectionParentOfto a fixpoint and then filters every canvas object by_imageParentOf, so it costs roughly O(collections × sweeps + canvasObjects) per call.regeneratePrefabInstancecalls it once per instance, andregenerateAllInstancesOfPrefabcalls that once per instance of the prefab. So editing a prefab's master, or attaching a script to it, walks the whole collection tree and the whole canvas-object list once for every live instance.Irrelevant at current scale — a handful of prefabs and a few dozen canvas objects. Filing it because it's the first place to look if stamped prefabs get used heavily on a large map. A spider map with a stamped panel per stop is the shape that would hit it hardest, since that's many instances of one prefab all regenerating together.
Cheapest fix is probably memoising the descendant set per master collection and invalidating on hierarchy change, rather than making the sweep itself cleverer. Introduced alongside the stamp path in #35.