Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by unitedone3D · Aug 19, 2021 at 03:24 PM · optimizationassetloadingasynchronoushiccup

How to stop game hitch from Loading a Large asset in Async method?

Hey there!

I have read lots of ambiguous information about this problem.

If you have a large asset (say very heavy image texture/model/prefab) that loads using 'async' method it 'jams' the main thread and causes a hitch...now I thought this was fixed in Unity 2021...with using Asset Bundles streaming or Addressables, also using Streaming...but alas, I read that Streaming causes hitching if the asset is really big. Is it better to do this with multiple threads (multithreading)....?

-Does ECS/DOTS solve this? -Is it only a I/O problem - needing a SSD/NVMe fast loading disk?

Here are the possible solutions I found out: - Preload assets (preload everything, which of course will take a lot of memory), using the Preload slot - Preload by 'loading everything in front of the camera' - before the scene starts, so that it is all loaded in RAM (you just need to have the camera 'look' at the assets - and then they are in memory; they will
hitch a 1st time..then they won't hitch anymore (in RAM memory) but you do that At the Start of the scene (won't matter because scene not started yet, still loading), before it starts you make a 'loading screen'/to hide it and then you do it (load it all and - destroy it all) then the scene starts - all the assets are in memory; no more hitching/hiccups when assets load. What I wonder about this technique is the prohibite memory cost to loading it All in memory from the start.. - LZ4H compression build, this specific compression is in 'chunks' based 'loading'...thus it seems that it only loads what it needs - that greatly reduces 'hiccup/hitching' while loading a spontaenous large asset in async method.

What else is there to Stop those asset loading hitches/hiccups? I have read that this a limitation of Unity and many other engines too; How?? Do they get around this problem to make no hitches ever?

''Make small/smaller/reduce size of texture/reduce prefab/in little parts...'' that much can help..but we are talking about async loading a Very Large Asset/Prefab - in real time - with no hitching/hiccups - repeatedly/constantly.

Thank you very much.

PS: I read that it is down to Coroutine, threads, Main thread vs Multithread....like it's confusing what is suppose to be the Real reason why it hitches on loading a large asset...yes it could be anything, but after removing so many possible reasons and still experiencing hitching, it looks like a engine limit? As anyone broken that limit somehow? Are there other ways to at least minimize them/mitigate them to being almost invisible to the eye - because a hitch/stall/freeze - is Very visible?

PPS: Found this ''A common approach for multithreaded shader compilation is to have a background thread dedicated to it..This is very important to do if you want to have an engine that doesn’t have a lot of hitching. Compiling shader pipelines can take a very long time, you need to implement such a multithreaded async compile scheme for your game to work well''...is Multithreaded Async the solution?

PPS: I think I found the 'sort of' solution, which is a hardware one; games require precaching to avoid hiccups (because they are due to I/O hard drive loading speed too slow vs loading in RAM memory), I am not sure but when combining game precaching with multithreading (to trickle the data slowly on the main thread and load the rest on 'background threads'), this would stop hiccups; it can be done by creating a RAMdisk, and basically, precaching the largest files of the game (such as the resources.asset giga file that contains all the assets) on the RAMdisk; you would need sufficient RAM (64-128GB...to precache the 'whole' game in RAM); I have on the internet of people that did RAMdisk and after that - their Hitches were gone ...it was not related to video, CPU, GPU or anything like that.. it was I/O hard drive/loading asset problem - from hard drive - into RAM - too slow - cause hitch. I see the parallel with Playstation 5's SSD hard drive and the UE5 demo that ran flawlessly (no hitching) it was due to the speed (of asset loading) of the SSD - to make for 'hitchless asset streaming' from disk; RAMdisk is the equivalent (by caching game on RAM), it will avoid hard drive I/O asset loading - causing hitch - the game will load - From RAMdisk, which is much faster than loading from a regular SATA hard drive. In PS5, it's the fast SSD technology, coupled with Fast DDR6 RAM. What I am wondering is if this has any impacy/bearing of singlethreaded vs multithreaded asynch loading...I am guessing the combination of RAMdisk + 128GB Fast RAM + multithreaded async + large page file would eliminate hitches.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

131 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Using the new "Video Player", large video won't load in Build, but will load in editor 4 Answers

How to create asset bundle in Project Tiny C# Mode? 0 Answers

"Big" 3ds model gives performance issues 3 Answers

How to convert Resources.LoadAll to Addressables? 1 Answer

LoadSceneAsync freeze workaround 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges