Mesh.AddBlendShapeFrame performance decreases when consecutively adding blend shapes
Unity: Mesh
Won't Fix
2023.2.X
2023.1.X
2022.2.X
2022.1.X
2021.2.X
2020.3.X
2019.4.X
2022.1 has reached end of life so the issue will be fixed in a newer version.
How to reproduce:
1. Open the user's attached project
2. Open scene Scenes/SampleScene
3. Open the Profiler (Window -> Analysis -> Profiler) and enable Deep Profile
4. Press the Play button, then exit Play mode when the Scene has finished loading
5. In the Profiler, observe the total time of Mesh.AddBlendShapeFrame calls in the first frame
6. Change the Profiler view from Hierarchy to Timeline
7. Observe the time taken for each of the separate Mesh.AddBlendShapeFrame calls over time, comparing the first and last calls
Expected result: the performance of adding blend shapes does not increase over time
Actual result: the performance of adding blend shapes increases from around 11ms to over 110ms over 250 calls, taking over 10 seconds in total