Search Issue Tracker
Fixed
Fixed in 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
- Sprite Atlas remains loaded in memory after scene change or unloading assets
- Decompressing a DeflateStream under IL2CPP misses a few bytes
- Referred style sheet stays dirty after saving when using the UIBuilder
- The Height map Amplitude is not working when using HDRP/LayeredLit
- Infinite inertial tensor rotation values are not discarded (both AB and RB)
Add comment