(Case 1256947) App launch loading times have increased from 6 seconds to 100+ seconds in 2020.2

Reported at: (Case 1256947) [XR] Oculus Quest build start of app and async single scene loading is vastly slower on 2020.2.0a15

The load time at the start of our Oculus Quest app and the loading time using async scene load between scenes is almost 2 minutes+ for very simple scenes even though the priority of loading is set to high. On earlier engine versions this load time was closer to 20-30 seconds.

This behaviour is only observed when at least 3 scenes are included in the build. However, when building an empty scene on it’s own, the load time is fine. If we add multiple other scenes in the build with that empty scene, the load time dramatically increases.

Often this has led to 100+ seconds in load time for the app start when on prior engine versions such as 2020.1 or 2019.x the load time was 3-6 seconds (during the Unity splash screen)
I backported the project from 2020.2.0a15 to 2020.1.0b12 and saw the load times immediately went back to their normal speeds. See this comparison video I made.
https://www.youtube.com/watch?v=1bELUAreWvI

See screenshot below from our bug report: Time to first swap is 105 seconds and the screen is just black that whole time, no splash screen showing even though splash screen is set to show.

3 Likes

It is very important to note also that the Unity splash screen doesn’t show if you build and run with about 5+ scenes in the build from this bug case. If you build with 1 scene only such as ‘Lobby’, the splash screen shows on app launch.

Splash screen XR bug acknowledged here: Unity Issue Tracker - [XR][XRSDK][Oculus Go][Oculus Quest] Virtual Reality Splash Image doesn't show up with new XR SDK

I cannot recreate this slowdown in editor, in editor on a PC the scenes load just as fast as they always did. On the Oculus Quest, when loading scenes there is barely any update of what is going on in android logcat, I just have to sit and wait 20-100 seconds for the app to start or for a scene to load.

1 Like

I have made an example repro project with one version using 2020.1.0b12 beta and one version using 2020.2.0a15 alpha. There is also a video in the .zip file showing me running through the apps so you know what to do and can see the load times for yourself in a much simpler reproducible project.

All you need to do is open the project in the right unity version, build and run on the Quest and copy what I do in the video.

https://drive.google.com/file/d/1CLGXlPYJN5VuAk-Q3nZcqKDpw9VWJS6H/view?usp=sharing

I hope QA or Unity staff can look into this severe performance regression, I have done my best to troubleshoot it myself.

1 Like

Thanks a lot for the excellent report @ROBYER1_1 , you should hear back from us soon.

5 Likes

Issuetracker link for this, if it affects you too please upvote it on the issue tracker

2 Likes

Ha, was just about to share the link but you beat me to it.

2 Likes

Hoping to see an update on the issue from this soon! Staying on beta releases now since this issue, as one project nears completion I can no longer experiment so much with the 2020.2 alpha :frowning:

1 Like

I reached out to the team for an update and they will look into it but couldn’t provide an ETA for a fix yet.

1 Like

Will the issue be added to known issues section of the 2020.2.0 Alpha releases? I can’t see issue id 1256947 here in the release notes for the current alpha.
https://unity3d.com/unity/alpha/2020.2.0a21

Probably in the next release notes, already released builds don’t get updated notes as far I know.

1 Like

The known issues section of the release notes only contains issues above a certain severity/prevalence threshold to avoid it from getting overcrowded. This issue is below that threshold so it won’t show up.

There is another issue related to URP that produces similar symptoms on other platforms. That one is currently being tracked here, and has a fix in review. It is possible that they’re related but I couldn’t find conclusive information.

1 Like

Original issue tracker here seems to be updated, glad it is fixed, hoping for a backport to 2020.1 or 2020.2 so i can avoid alpha versions for a while!

@LeonhardP Can I request a backport of this please? To 2020.2 versions at least, and 2020.1 also if it occurs there or even has a chance of occuring.

1 Like

Hi @ROBYER1_1 ,

The fix for Unity Issue Tracker - Android launch times increased x4 from URP 8.1.0 to URP 10.0.0-preview.26 should be available in the next 10.1.x release of the URP package for 2020.2.

The issue is specific to the 10.x versions of URP, so there won’t be any backports further than that.

1 Like

Probably the same issue - Quest (XR) build, upgraded the project from an older unity version, not using URP (at least not explicitly - don’t have the package in the package manager).

Scene loading times went from 1s to ~10s - using 2020.2.0b7 (not sure if it was fixed in that release - tried to read the release notes but didn’t found anything related).

Should I upgrade to 2020.2.0b9?

Many thanks <3

Hi @Elmak

That’s not the same issue as the one discussed in this thread since that is URP specific. Can you please submit a bug report with a reproduction project attached to it?

We’re also experiencing insane load times on Quest on 2020.2, not using URP, regular built-in and absolutely trivial scenes. I’ll try to reproduce and send a report.

1 Like

Same on Android phone. At first I though it was the shaders preloading, but its the same when they’re cleared. Tried deleting the library folder and recompile it as well, didn’t help. I’d say a 10x time increase is about right.

Edit - This is happening in both 10.1.0 and 10.2.0 version of URP.

2 Likes

I too have a non URP, regular android AR Foundation project that has much slower loads too. Bit fed up of these easy to catch regressions!

1 Like

Found a related one @LeonhardP : Unity Issue Tracker - [Android] LZ4 compression takes way longer to open than Default

Also I took some measurements to get to the bottom of this, as we’re effectively blocked on multiple current projects (x4-x10 startup time regression = unhappy clients).
I kept the scene deliberately simple but there’s already clearly regressions visible.

Unity 2019.4
Texture Compression “ASTC”
Compression “Default”
Backend: IL2CPP

Mi 9 (no XR)
startup: 2.08s

Quest (no XR)
startup: 2.08

Quest (with XR)
startup: 4.54
build time: 62s

Quest (with XR and empty loader scene)
startup: 4.81
build time: 85s

Unity 2020.2
Texture Compression “ASTC”
Compression “Default”
Backend: IL2CPP

Mi 9 (no XR)
startup: 2.06s

Quest (no XR)
startup: 3.25

Quest (with XR)
startup: 4.53
build time: 65s

Quest (with XR and empty loader scene):
startup: 8.01
build time: 120s

Summary
From the above, to me it’s clear that

  • XR startup time adds (or multiplies, not sure) quite a lot of time to general startup
  • It seems that 2020.2 regresses heavily with multiple scenes (an empty scene is scene 0, then that just loads another scene in OnEnable).
  • Resources.Load / Shader.Find et al are massively slower in 2020.2

I went a bit deeper and profiled this in a larger project.
There is a number of really weird places in terms of timing; some of them seem to contribute to the slowdowns.

Not sure what’s going on here, “SetUserDefinedSettings” alone is taking between 0.5 and 1s in 2020.2

URP Volume Framework does an entire assembly walk just to initialize itself (0.5s)

But the actual regression here seems to be Resources.Load; every single Resources.Load call takes > 3 seconds!!

another example - note the blocking time is almost identical

And one more, this call internally loads ~10 shaders in resources (from the Oculus integration) and thus easily blocks for 30 seconds:

5 Likes