Search Issue Tracker
Fixed
Fixed in 2020.3.X, 2020.3.43f1
Votes
0
Found in
2020.3.34f1
Issue ID
UUM-1849
Regression
No
[Backport] Slower performance of Instantiate() when using it in a build compared to the editor
How to reproduce:
1. Open user's attached "BugReport" project
2. Open Assets/Scenes/StartScreen
3. Enter Play Mode
4. Press the "Generate Chunks" button in the Game View window
5. Wait until the chunks are generated
6. Open the projects directory and open the temp.txt file
7. Observe how much time each chunk took to generate
8. Build the project
9. Run the build through the build's directory
10. Press the "Generate Chunks" button in the Build
11. Wait until the chunks are generated
12. Open the temp.txt file in the build's directory
13. Observe the difference time difference in the build and the editor
Expected result: It takes the same amount of time to instantiate a chunk in the Editor and in the Build
Actual result: It takes about 10 times longer to Instantiate a chunk in the Build
Reproducible with: 2020.1.5f1, 2020.2.0b3
Can't reproduce: 2018.4.27f1, 2019.4.10f1 (can't downgrade the project)
Notes:
- The temp.txt file contains the amount of time (ms) each chunk took to instantiate calculated using System.Diagnostics.Stopwatch
- Reproducible with Windows and Mac standalone builds
- Could not reproduce the slow performance by instantiating about 100000 cube prefabs
- I suspect the issue might be caused by Instantiating a large number of big prefabs
- You can see what kind of object the user is Instantiating by opening Assets/Prefabs/Chunk prefab and viewing the elements of "All Possible Objects" public variable
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
Add comment