Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.1.0b1
2018.2.12f1
Issue ID
1102947
Regression
Yes
[iOS][Android][.NET 4.x][IL2CPP] Using System.Net.Security.SslStream causes severe performance issues on low-end devices
To reproduce:
1. Download attached project "request_tests.zip" and open in Unity
2. Open "requests" scene
3. Set Scripting Runtime Version to .NET 4.x
4. Set Scripting Backend to IL2CPP
5. Build for iOS or Android
6. Deploy the built project to the low-end device
7. Press "Do Setup" and then press "Start" beside "Best HTTP"
Expected behavior: The time counter does not stutter
Actual behavior: The time counter stutter
Notes:
- This issue does not reproduce on Windows Standalone and macOS Standalone
- This issue appears only on iOS and Android (IL2CPP)
- If you use .NET 3.5 or Mono the stuttering doesn't occur
- If you turn off SSL Stream the stuttering doesn't occur
- If you press the "Start" button beside "Unity" it will make the same requests but through UnityWebRequest - this doesn't stutter either
Tested with:
- iPod Touch 5th Gen, iOS: 9.3.5 - Reproduced
- iPhone 5, iOS: 10.1.1 - Reproduced
- Lge Nexus 5 (Nexus 5), Android 6.0.1, CPU: Snapdragon 800 MSM8974, GPU: Adreno (TM) 330 - Reproduced
- iPhone SE, iOS: 11.4.1 - Not Reproduced
- iPhone 7s Plus, iOS: 12.0 - Not Reproduced
Reproduced on Unity 2018.1.0b1, 2018.1.9f2, 2018.2.18f1, 2018.3.0b12 and 2019.1.0a10
Not reproduced on Unity 2017.4.16f1 and 2018.1.0a7
Regression on Unity 2018.1.0b1
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
- Crash on __pthread_kill when initializing Vuplex WebView while entering the Play Mode
- Crash on FindSurface when adding a custom Renderer Feature to a 2D Renderer Data Asset
- [Android] [Vulkan] [UI Toolkit] Application crashes when the device is rotated when it has UI Toolkit TextField on Vulkan devices
- Crash on DualThreadAllocator<DynamicHeapAllocator>::TryDeallocate when opening a specific project
- Crash on memset_repstos when pressing a UI button while in Play Mode
Resolution Note:
The Best HTTP implementation of HTTPResponse.ReadTo is reading one byte at a time from the SslStream. The SslStream code in the .NET 4.x profile does not buffer behind the scenes, so calling ReadByte on an entire stream is not recommended. See https://github.com/mono/mono/issues/7077.