View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001558 | NoesisGUI | Unity | public | 2019-10-03 06:30 | 2020-02-18 17:56 |
| Reporter | nokola | Assigned To | sfernandez | ||
| Priority | normal | Severity | major | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.2.5 | ||||
| Target Version | 3.0.0 | ||||
| Summary | 0001558: Performance regression: RegisterNativeTypes takes 0.5 seconds on newer 8-core phone | ||||
| Description | Android: This (perhaps...or maybe something else) makes a noticeable glitch during app load on Android compared to 2.2.4. I suspect Noesis.Gui.Init() gets called too early or there's more code in RegisterNativeTypes(). Could be something else. I expect on slower phones the cost of RegisterNativeTypes() to be significantly higher (second or two.) | ||||
| Steps To Reproduce | Add this code to Assets\NoesisGUI\Plugins\API\Core\Extend.cs, Init(), the RegisterNativeTypes() code takes 0.5 seconds on xiaomi redmi note 7 phone: Run on Android and check logcat | ||||
| Platform | Any | ||||
|
Hi, I've been doing some tests with our samples, comparing 2.2.4 with 2.2.5 version and there is no difference with respect to that function. Those numbers are terrible, though, and it is something we should investigate. |
|
|
You're right - 2.2.4 is similar timing regarding the RegisterNativeTypes() function. Maybe there's slowdown somewhere else, or I'm making it up. I've noticed a longer black screen after installing 2.2.5, then profiled in Editor and found RegisterNativeTypes() taking a significant time. That's when I assumed it was this function responsible (because I haven't seen it show up in profiling before, thus assumed it's regression without further testing.) I tried profiling startup time on Android device with Unity 2018.4.10f. Unfortunately, Unity uses ~5GB of RAM for the first 2-3 seconds of the app and crashes. I haven't been able to pinpoint what's the "hot path" on Android device yet. I can only profile in Editor currently, which makes it harder to trace function calls, also much faster on PC than phone. If you can get profiling on device, and see if there's another hot path during startup that will be awesome. I'll try something with the native Android profilers (not through Unity.) |
|
|
I did some more testing - there seems to be no performance regression during startup from 2.2.4 to 2.2.5. Either way, reducing cost for RegisterNativeTypes() startup will be a very good win! :) |
|
|
Great to know there is no performance regression on your side either... from our latest changes I couldn't figure out anything affecting startup times. Regarding RegisterNativeTypes() we found an alternative implementation that will dramatically reduce the loading times (in PC from 300ms to 20ms approx.). |
|
|
Nice! Also good job on speeding up the release cadence - it's good to see smaller but more often version releases! |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-10-03 06:30 | nokola | New Issue | |
| 2019-10-03 06:30 | nokola | Tag Attached: Unity | |
| 2019-10-03 09:42 | sfernandez | Assigned To | => sfernandez |
| 2019-10-03 09:42 | sfernandez | Status | new => assigned |
| 2019-10-03 11:18 | sfernandez | Status | assigned => feedback |
| 2019-10-03 11:18 | sfernandez | Note Added: 0005975 | |
| 2019-10-03 17:31 | nokola | Note Added: 0005976 | |
| 2019-10-03 17:31 | nokola | Status | feedback => assigned |
| 2019-10-03 17:54 | nokola | Note Added: 0005977 | |
| 2019-10-04 11:30 | sfernandez | Note Added: 0005978 | |
| 2019-10-04 11:32 | sfernandez | Note Edited: 0005978 | |
| 2019-10-04 12:29 | sfernandez | Status | assigned => resolved |
| 2019-10-04 12:29 | sfernandez | Fixed in Version | => 2.3.0 |
| 2019-10-04 12:29 | sfernandez | Target Version | => 2.3.0 |
| 2019-10-04 16:51 | nokola | Status | resolved => closed |
| 2019-10-04 16:51 | nokola | Resolution | open => fixed |
| 2019-10-04 16:51 | nokola | Note Added: 0005979 | |
| 2020-02-18 17:56 | sfernandez | Status | closed => resolved |
| 2020-02-18 17:56 | sfernandez | Target Version | 2.3.0 => 3.0.0 |
| 2025-10-10 13:29 | jsantos | Category | Unity3D => Unity |