Search Unity

Unity / Profiler and it's memory allocation issues

Discussion in 'General Discussion' started by xVergilx, Jan 1, 2019.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Does anyone else feel like it's allocating too much?

    Yeah sure those statistics aren't free, but maybe there's something that can be done to reduce these allocations?

    I've recently started writing some editor extensions, and noticed that it is near impossible to profile editor's memory, due to profiler being complete memory hog. Previosly I though that it was my PC that was struggling at 4 GB, but with 16GB it's the same old thing. Worse than that - it continues to allocate even beyond that into swap.

    Some Unity's at my workplace just continue crashing due to profiler memory allocs.

    I wish you could restrict maximum frame count that it is recording to something that is actually useful.
    Because hitting clear isn't that fun after a while.

    Maybe I'm missing something, and there's really easy way of looking into editors performance.

    Also, maybe there's a way to restrict Unity of using only portion of memory (that would be really nice).
    Also, seems like Unity is simply leaking (2018.3.0f2). It doesn't show up what is leaking in Profiler, so I guess it's native.
     
    Last edited: Jan 1, 2019
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,451
    Hi :)

    Thanks for the feedback on this. We are considering exposing some settings to offer better control over how much memory will be used for sending data from the player to the editor and doing something about the hard cap at 300 frames is also on our radar. Incidentally, while the profiler can only show you the last 300 frames, we do keep a record of all profiled frames in memory (and they can be used from API). So what you see as a leak, might just be that. We'll keep this in mind and maybe outline what amount of memory is allocated by the profiler.
     
    xVergilx likes this.