Search Unity

Feature Request show expansion events on the memory profiler

Discussion in 'Profiler Previews' started by laurentlavigne, Apr 6, 2021.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,318
    I kept crunching textures to lower memory footprint but nothing shrunk and I just learned that crunch only affects build size, they get decompressed on load. And get loaded on first use (I guess)
    I'm wondering what else goes on. Partially because there is so much to know and i can't be bothered reading the entire documentation, I rely on the UI to tell me all that stuff.
    It would be nice to see what causes data to expand.
    I'm thinking vertical bars showing expansion events such as "decompressing" or "load" on the horizontal memory timeline.
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,557
    Hi Laurent,

    Thanks for the feedback. I agree that the UI should be mostly conveying this information directly. For this particularly and within the snapshot based memory profiler we want to eventually report meta data with e.g. textures to report the compression format, pixel dimensions and similar to be able to more clearly show how the size came together and what might be better options based on those data points and the platform the snapshot came from. In the mean time, documentation is a crucial bridge towards my UX dreams. In this case particularly this page and this page can help navigating this space without needing to read the documentation in its entirety.

    The CPU Timeline shows load events with file names and (and I believe the file size too) as meta information viewable on selection. The Memory profiler chart only shows the full texture memory increase as a one frame bump of the resulting texture size once the texture is integrated into the loaded asset data. I'm not sure how we would integrate the file-size-to-memory-size increase in the current line based chart without confusing matters more than the mixed units in that chart already muddy the waters... I'll keep that idea in mind, though I guess this would still run the risk of being information that might be easy to be missed if one e.g. only starts profiling after the expansion has already taken place?

    A memory timeline view is still a ways off into the future. Frame marking events for loading and the like is a different feature we're trying to nail down from a long, abstract wish-list to a coherent and shippable feature...
     
    laurentlavigne likes this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,318
    the entire package and its textures or meshes are decompressed before 1st frame?
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,557
    If you profile since the startup you would catch it, until the profiler frames run out of scope... I'm not saying it would not make sense, just maybe lower prio than getting the most common path to catching it definitely if it's present in memory.

    Continuous memory captures at the detail level this would likely need (i.e. per allocation tracking) needs technological groundwork that is still a ways off too.
     
    laurentlavigne likes this.
unityunity