Search Issue Tracker

By Design

Votes

0

Found in

2022.3.68f1

6000.0.62f1

6000.2.12f1

6000.3.0b9

6000.4.0a4

6000.5.0a1

Issue ID

UUM-126334

Regression

Yes

[Android] AssetBundle loading performance degradation when loading from a local Assetbundle

-

How to reproduce:
1. Open the “ReproProject.zip“ project
2. Open the “SampleScene“
3. In the top-bar, click “Build > Build Android APK“
4. Install the “.apk“ on a device
5. Open the “Window > Analysis > Profiler“ window
6. Open the application on a device (it should autoconnect to the Profiler)
7. Press the “Load Asset“ button
8. Observe the Profiler

Expected result: No spikes
Actual result: Large spike when loading AssetBundles

Reproducible with: 2022.3.64f1, 2022.3.68f1, 6000.0.62f1, 6000.2.12f, 6000.3.0b9, 6000.4.0a4, 6000.5.0a1
Not reproducible with: 2022.3.63f1

Reproducible environment: macOS 15.7 (M4 Max), Windows 11 (Reporters)
Not reproducible environment: No other environment tested

Reproducible with these devices:
VLNQA00319, Google - (Pixel 4), Android 13, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00511, Samsung Galaxy S8 (SM-G950F), Android 9, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00612, Samsung Galaxy S24 (SM-S921B), Android 15, CPU: Exynos 2400, GPU: ANGLE (Samsung Xclipse 940) on Vulkan 1.3.279
VLNQA00335, Samsung Galaxy S20+ 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
VLNQA00107, Huawei Nexus 6P (Nexus 6P), Android 8.1.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430

Note: Asset loading delay only occurs when loading from a local asset bundle (packaged into the “APK” in “StreamingAssets”)

  1. Resolution Note:

    For asset bundles to be loaded fast, they must be packed to the apk without compression. This is controlled by noCompress string in the build.gradle file. This string can contain only extensions or full file names (no wildcards), this limitation comes from Google. So previously we were forced to add ALL StreamingAsset files without extension to noCompress string separately. And when there were too many of such files Gradle build worked VERY slow or even crashed. Because of this we were forced to modify this logic, so now only extensions are added to the noCompress string, and asset bundles without extension are packed to the apk with compression. The change was mentioned in the Release Notes for Unity 2022.3.64f1.
    To solve the problem it is enough to add any extension to the asset bundle files.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.