Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Deep Profiler is buggy.

Discussion in '5.4 Beta' started by laurentlavigne, Jul 23, 2016.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    1. unusably slow: click in the profiler graph, which pauses the game, then expand the hierarchy overview a bit, it's almost unsable it's so slow. It's as if the profiler emulates how slow the game runs, depsite the fact that it's paused. #816971
    2. doesn't show name BeginSample("name") #816972
    3. Object: N/A regardless of the monobehavior being profiled, Object always shows as N/A, they're attached to GO, ya'know?
    These have existed since profiler has existed, time to fix that old code, fellas!
     
    Last edited: Jul 23, 2016
    MrEsquire likes this.
  2. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    yes this

    weird how its sooo much slower to move the slider onto a timeline area that took maybe 9,000ms (infact you can barely move the slider onto such a spike in calculations) while moving the slider onto over 100ms or less is doable.

    Its made using the deep profiler pointless, as it does seem like it emulates just how long something took.
     
    laurentlavigne likes this.
  3. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    Hi,

    Thanks for reporting this, we are working on ProfilerWindow performance and general Profiler improvements at the moment.

    Deep profiler installs hooks into every mono method including managed UI itself. We have a prototype of deep-profiler alternative which installs hooks into only required subset of functions (namespace, assembly). Also TreeView itself got an upgrade. These improvements are targeting future releases.

    This is a known issue and will be fixed in future releases. We'll backport it to 5.4. (The bug's reason is that BeginSample call being wrapped by deep profiler immediately "ends" the sample when exiting the function, leaving only deep-profiler sample).

    Do you mean MonoBehaviour functions exposed by deep profiler? We do association with an object already when invoking "Update", "Awake", etc. standard calls.
     
    laurentlavigne likes this.
  4. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    That happens because of profiling Profiler Window itself and lots of data to display. Profiler's overhead can be reduced if you disable profiler. Also we have a faster Timeline View (coming in 5.5) which can display much more samples than now.
     
    fffMalzbier likes this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Backported to 5.4?
    Hooks into editor code as well?

    Can you explain further? I don't think we're talking about the same.
     
  6. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    No, unfortunately not now. This is for later - targeting 5.5, it might be possible to backport UI improvements to 5.4, but these improvements are still in development and it will depend on amount of runtime changes.
    Yes, editor assemblies as well if you want to profile them. Basically we are making deep profiler configurable.
    I meant that we set an object then invoking "magic" methods of MonoBehaviour like Awake, Update, OnEnable, etc. You can see that e.g. under BehaviourUpdate node. But with deep profiler that information is lost because of bug #2, where injected into managed invocation sample ends native sample immediately and it gets discarded.
     
    laurentlavigne likes this.
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Gotcha!

    Nice to hear you're working on it, I'm wondering, do you plan to extend the interaction - for example double click or right click on an overview entry opens the script at the position.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    For non bugs, I would consider backports a waste of Unity's time and only delays when we can get finals, so personally I'm not interested in backports unless bugfixes.
     
  9. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    "Also we have a faster Timeline View (coming in 5.5) which can display much more samples than now."

    I look forward to seeing those profiler improvements its definitely an area that gets used a lot and being able to use the deep profiler more often and it being faster would save time getting to the root problems quicker. Make it easier to export out that data and save/copy hierarchy snapshot would also help! I gave and saw plenty of suggestions in the profiler topic a while back.
     
  10. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    More importantly, once 5.4 is out, the focus will be entirely on 'keep it stable so that people can ship games on it.' Every single change we make carries risk of unexpected side-effects, so we will be trying our best to restrict the changes only to fixes for issues that are shipstopping people or are causing a very high and widespread amount of pain...
     
  11. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    We've collected and prioritized feedback in that thread. Thanks a lot for your input!
    We'll expose API to give access to profiler's data. Most of major profiler improvements are targeting 5.6 (UI improvements, streaming profiler, custom metadata with samples, profiler in non-dev players), some of them (UI performance fixes, expose internal counters) planned to be in 5.5.