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
- Assigned font's bold/font-weight styles render using Default Font's assets when Default Font has corresponding style assets defined in TMP Settings
- "Modifying the parent of a VisualElement while it’s already being modified is not allowed" error is thrown when entering text and pressing tab in the Search window
- Mesh colliders are not updating their positions of bounds correctly
- Images are missing from the "Open the sprite editor" documentation for 6.0, 6.1 and 6.2
- The previous element in the array is modified when assigning an Asset to a new element of AssetReferenceT
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0a1.495
Resolution Note (fix version 2019.4):
Fixed in: 2019.4.37f1