Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.3.X
Performance decreases with a large number of components when AddComponent is used
How to reproduce it:
1. Open attached project '1278548.zip'
2. Load 'AddComponentScene' from 'Assets' > 'FunctionalTests' > 'AddComponentTest' folder
3. Play the 'AddComponentScene'
4. Check Profiler window and notice that adding EmptyComponent takes about 0.465ms and adding EmptyComponent_9999 takes only 0.149ms
5. Pause the 'AddComponentScene'
6. Go to 'Assets' > 'FunctionalTests' > 'AddComponentTest' > 'EmptyComponents' folder and move all 'EmptyComponent_<NUMBER>' scripts out of the project except 'EmptyComponent_9999'
7. Reimport all assets and reload the editor
8. Play the test scene
9. Check Profiler window and notice that adding EmptyComponent and EmptyComponent_9999 takes only 0.02ms
Expected result: The use of AddComponent should not cause performance spikes with a large number of components
Actual result: The use of AddComponent causes performance spikes with a large number of components
Reproducible with: 2018.4.27f1, 2019.4.10f1, 2020.1.5f1, 2020.2.0b2
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux] Android build fails with “CommandInvokationFailure: Gradle build failed.” error
- [iOS] Touch.rawPosition changes position when touch is dragged
- Loading a scene with a large amount of light probes causes a performance spike
- The player does not refresh window display properties when opening the Player on another display
- Spot Light flickers when when it's far from the origin point