Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.3.X
Votes
1
Found in
2018.4
2019.4.2f1
2020.2
Issue ID
1278548
Regression
No
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Quest] Materials are not rendering in Player when "Single Pass Instanced \ Multi-View" is selected and "Surface Type" is set to "Transparent"
- Hair master stack shader on hair is blown out when there is a backlit light on it
- [Editor] Profiler (Standalone Process) "Live" button is greyed out by default
- UIToolkit bindings on RadioButtonGroup is not displaying the selected radio button when the choice list is bound
- Multiple Video Players are not playing simultaneously when played in WebGL
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0a1.495
Resolution Note (fix version 2019.4):
Fixed in: 2019.4.37f1