Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question What exactly falls into the ResourceManager memory usage?

Discussion in 'Profiler Previews' started by Hik-AV, Jun 19, 2023.

  1. Hik-AV

    Hik-AV

    Joined:
    Mar 24, 2021
    Posts:
    3
    Hello!

    Over the past year I've seen the memory usage of the ResourceManager section on our project grow from ~20MB to 37MB currently. In order to find improvement opportunities I'm trying to better understand what contributes to its size, but unfortunately I couldn't find much info on this.
    Screen Shot 2023-06-19 at 17.52.34.png

    Would it be possible to share some details on what impacts this native memory size? I'm not sure if this object is related to addressables metadata, Unity's Resources file mapping, both or something completely different like low level memory allocation management.

    Some context: this snapshot was taken on an Android player, built on Unity 2021.3.18f1 as a development build and taken with memory profiler package version 0.7.1.

    As always, thanks a lot for your wonderful work on this package!
     
    alexeyzakharov likes this.
  2. alexeyzakharov

    alexeyzakharov

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    507
    ResourceManager manages the default Player resources shipped with Unity ("unity default resources" file).
    Did you notice it grow when updating Unity versions?
     
  3. alexeyzakharov

    alexeyzakharov

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    507
    extra piece of information - ResourceManager is indeed also responsible for mapping all assets in Resources folder and their dependencies. So it may also grow if you have a lot of assets with interdependencies