Search Issue Tracker
By Design
Votes
1
Found in
2018.4
2019.3.7f1
2020.2
Issue ID
1254116
Regression
No
[IL2CPP][Android] Calling DateTime.now for the first time when using IL2CPP is CPU intensive(takes from 200 to 500 ms)
Steps to reproduce:
1. Open user attached project "DateTimeNowUnityProject.zip"
2. Build it on Android with Autoconnect profiler option enabled
3. Run the profiler right before opening the app
4. Stop Recording the profiler
5. In the Profiler Analyzer press "Pull Data"
6. In the top analyzer field, select the second intensive frame
7. In the search bar type "Date"
8. In the "Marker Details for the currently selected range" find "Assembly-CSharo.dll!::TestDateTimeNow.Start()..." (this line should be on the top)
9. Notice it takes a lot of time to load (from 200 to 500 ms)
Expected results: Calling DateTime.now for the first time is not CPU intensive
Actual results: Calling DateTime.now for the first time is CPU intensive making load time anywhere from 200 to 500 ms
Reproducible with: 2018.4.23f1, 2019.3.16f1, 2019.4.0f1, 2020.1.0b13, 2020.2.0a15
VLNQA00220, Samsung Galaxy Note9 (SM-N960F), Android 8.1.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00123, Google Pixel 2 XL (Pixel 2 XL), Android R, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
Note:
- Reproduction steps are displayed with screenshots
- Does not reproduce with standalone
- Does not reproduce with mono scripting backend
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
- Localization Group Rules bypasses Locale logic when SharedGroup asset provided
- UI Toolkit World UI Text Field unfocuses immediately when clicking on it using XR Controller
- Crash on CallWindowProcW when entering Play mode for the second time and running the Editor in the background while using System.Windows.Forms functions
- 2D Freeform Light shadows disappear when light center is offset from shape bounds
- Crash on MarkAllDependencies when opening scenes with Assets from the YarnSpinner package
Resolution Note (2020.2.X):
Closing the same way as the duplicate.
Tried on two devices at hand and Asus ROG Phone it took 132 ms, while it took ~500 MS on iPhone 6S, so it seems the difference is device specific, not platform specific.