Search Unity

Question how do you scroll back in time in the profiler?

Discussion in 'Editor & General Support' started by laurentlavigne, Jun 19, 2021.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    upload_2021-6-18_17-15-41.png
    5000 ticks are stored, I'd like to access that in real time
    i tried middle dragging, nothing
    there is also no horizontal scrollbar so maybe it's nerfed "by design"
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,457
    They aren't stored, just counted to give some context of on which frame number(s) since beginning the capture you're looking at.

    You can increase the amount of frames that will get retained in the the preferences, up to 2000 are possible.

    All of these are retained in RAM so we need to figure out a format in which to Ringbuffet these to and from disk, on top of adding scrolling and other UX adjustments, in order to eventually eliminate these limits entirely. It's something we constantly have in the back of our minds and try to make plans towards of but so far, no ETA.
     
    adamgolden likes this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    2000 helps a lot, thanks.
    Why 2000 limit by the way? Is there a problem somewhere in that 10 year old code that stops from getting 10K samples? Seems that the display already does the sampling properly (which is really cool).

    Seems like it's pure UI facing stuff that touches zero gamedev facing SDK so why is this taking five-year-plan type thinking?

    PS: those profiler modules could use a RMB>close to close them and replace the small X we used to have, or make the current module menu stay open like the layer menu so we can save a few click & move.
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,457
    Admittedly, it's somewhat arbitrary based on how many pixels your screen is likely to be wide enough for. Also, as noted in the settings UI if you turn it up too much, and as I mentioned above, the frames are retained in RAM. If the Profiler starts running out of RAM, older frames will be discarded. So much more than that would likely not do much for you but cause frames to be dropped earlier.

    Trust me, if there wasn't, it already be done. We have 2 data formats, both frame based, neither designed to be ring-buffered to disk. Everything currently build on and around them and all frames getting loaded or streamdr into RAM.

    Besides technical limitations, there's also just plain scheduling priorities with limited dev times. That's what needs the planning so we focus on what's the most important at a given time (profiler connection stability, bug fixes, GPU profiling, Extensibility, Memory Profiler...). We are trying to weave steps towards a solution to this issue in other work where possible already.

    I thought that was already the case, at least in 2021.2?
     
    Kurt-Dekker and laurentlavigne like this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Oh I have no idea what you guys are facing and this is very interesting to learn. Are you slowly moving towards clock time based data? I guess the 2 data formats were for gpu and cpu stuff... gpu kept breaking and coming back, driver caused we're told which makes sense, I wonder if there is another reason.

    Oh man that one, I even forgot about that one. In fact I should check out 2021.2 see if the GPU works in remote with a Switch, that would be very nice.
    Ah yes I just saw that. It's nice thanks for continually improving profiler. (RMB close would be nice still ;)
     
  6. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,457
    We're thinking about different ways to deal with this. The 2GB limit per frame is another pain point with the current data format. Another is that you kinda have to read it in one go and can't skip ahead to a specific point in time.

    No, it's .raw (or streamed data) and .data (processed save format). We'll likely axe .data and restructure .raw but that's all still very up in the air.

    The GPU Profiler module still doesn't work in 2021.2 but ProfilerRecorder can record GPU timings on, I believe, all platforms & graphics APIs (might be that one is still somewhat buggy). Getting it all to display in a way that actually makes sense in the UI is something that's still pending. The Hierarchical display doesn't exactly fit all that well.

    That might've been true initially but more and more Graphics API connection layers and systems (Graphics Jobs) were written without even attempting to make them work with the GPU profiler, which had a form that was some times incompatible with them anyways. From 2019.3 on, the GPU profiler offered a more concrete explanation for why it didn't work.
     
    Last edited: Jun 20, 2021
    laurentlavigne likes this.
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Gotcha, thanks for all the details, it looks like the various teams need to speak more.
     
  8. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,457
    *Needed, it's all cleared up now. (not that continued conversations wouldn't be beneficial ;) )
     
    Last edited: Jun 21, 2021
    laurentlavigne likes this.