Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2020.3.X, 2021.2.X
Votes
0
Found in
2020.3
2020.3.21f1
2021.2
2022.1
Issue ID
1387295
Regression
Yes
AddComponent's general performance is worse in 2020.3 and above when compared to 2019.4
Reproduction steps:
1. Open the attached project "AddComponent_2019.4.23.zip"
2. Switch the platform target to Android, and enable Development Build
3. Build and Run on the project on a device
4. Open the Profiler window and attach it to the Android process running on the device and monitor the CPU usage module with the Timeline view selected
5. Select the 'Start' button on the screen of the device and wait until the button will be replaced from "Start" to "Reset"
6. Pause the process in the Profiler and notice a spike on the timeline that lasts 2 frames
7. Select the first frame of the spike and note on the Main Thread on the below Timeline that many AddComponent calls occur in groups of 2 (e.g group one is 1st and 2nd call of T1, group 2 is T2, etc).
8. Notice the time difference between the 1st and 2nd call of AddComponent on the same script (Please refer to attached profiler screenshot '2019_T_AddComponents.png' for visual representation)
9. Open the attached project "AddComponent_2020.zip" and repeat the steps from step 2
10. Notice the time difference between the 1st and 2nd call of AddComponent on the same script (Visual representation found in the 2020 screenshots)
Expected result: The time AddComponent takes to process, and the time subsequent calls to add the same script remain consistent between versions.
Actual result: The time AddComponent takes to process, and the time subsequent calls to add the same script both take considerably longer on 2020.3 and the reduction in time for the 2nd call to an already loaded script is not as effective as shown in the attached screenshots.
Reproducible with: 2020.3.24f, 2021.2.6f1, 2022.1.0b1
Not reproducible with: 2019.4.33f1
Tested the issue with:
----------, Huawei - (ELS-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G76
Notes:
-Screenshots are attached in the "ProfilerScreenshots.zip"
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2022.2):
Fixed in 2022.1.0a13
Resolution Note (fix version 2021.2):
Fixed in 2021.2.17f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.31f1