Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.3.5f1
2019.1.0a1
2019.2.0a1
Issue ID
1131637
Regression
No
List.Sort causes more memory allocation with .NET 4.x than .NET 3.5
How to reproduce:
1. Open the project attached.
2. Open the "SampleScene" scene
3. Make sure that Scripting Runtime Version is .NET 4.x
4. Open the Profiler and enable Deep Profile
5. Enter the Play Mode
6. Examine GC Alloc column in the Profiler.
Expected result: .NET 4.x and .NET 3.5 allocates the same amount of memory
Actual result: .Net 4.x allocates more memory than .NET 3.5
Reproducible with: 2017.4.23f1, 2018.3.8f1, 2019.1.0b7, 2019.2.0a8
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note:
The .NET 4.x class libraries are using the latest .NET Core code for this functionality. The allocation can be avoided by using the Sort overload taking a System.Comparison<T> parameter.
In general we do not ensure particular performance or allocation patterns in .NET APIs.