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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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