Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Assets [WIP] Heap Explorer - Memory Profiler, Debugger and Analyzer for Unity

Discussion in 'Works In Progress' started by Peter77, Apr 22, 2018.

  1. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,436
    Thanks a lot of the encouragement!

    I've a pretty cool new feature in the works, that I'll show in a few days. Make sure to watch this forum thread, to get a notification when I post an update. :)
     
  2. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    384
    Having played with the new MemoryProfiler at Unite and having a good chat with both devs currently working on it (the backend dev and UI dev), it is very worth having a chat with them with any of the issues you have uncovered in the API directly. PM me if you would like to get in contact with them.
     
    Peter77 likes this.
  3. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,436
    Uploaded an update, same link as before.

    Changelog
    • C++ Objects View: Added asset preview. Memory snapshots do not contain asset memory, thus the preview is generated from the asset in the project instead rather than the memory snapshot!
    • C++ Objects View: Reworked list filtering. It allows to change filter settings without the list being recreated every time you change a single option. You have to apply those changes now. This helps to save time when filtering big memory snapshots.
    • C++ Objects View: If any list filtering is active, the "Filter" button in the toolbar uses a different color, to make it obvious filtering is in place.
    • C++ Objects View: Fixed "Type" display of MonoBehaviour, which now displays the actual derived type rather than just MonoBehaviour always.
    • C++ Objects View: Fixed "Type" column sometimes showing the object name rather than type.
    • Brief Overview: Changing wording of the Memory Section description.


    Please let me know what you think.
     
  4. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,436
    That's a nice offer, thank you.

    Several months ago, I contacted Unity Technologies and asked whether they're interested to help me with some memory profiling API issues.

    At that time, they gave me two or three contacts, unfortunately this didn't lead to more than just one email with no helpful information.

    Thus, I doubt it would be helpful trying to contact another UT person. If they're interested to make the Unity development world a better place by helping me helping everyone else being able to profile memory in large projects, they would have shown some interest to do this by now.

    PS: I documented most issues/questions in Heap Explorer's documentation. They did fix various of those bugs, which is really great. But there are still a few things and questions I would like to get answered.
     
    Last edited: Jul 7, 2018
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    48
    Hi Peter, sorry our communication was a bit spotty so far. There is a lot still in flux with the backend as well as the UI for the new Memory Profiler and we're still a rather small team for the amount of work that needs to still go into this. I've been monitoring this thread sporadically and we're fixing things, but we're sort of split between the old backend (which your stuff is based on) and the new one (with better performance and stability which will replace the old one under the hood while keeping the API) and getting that balance right when there is a huge push to get this to our users is tricky.

    We do however greatly appreciate you pushing us on this and finding things we missed. Sometimes, half of the bugs for our team where reported by you and we always had to weight fixing them vs moving forward with the new stuff making sure it's fixed there. Also, just getting the lowlevel code that facilitates all of this into our codebase while making sure we don't regress is a very ... involved process.

    Also, pre-Unite, nothing was announced yet so it was a bit tricky to talk about it too ;)
    I can't promise anything but the backend and the new (additional) API has to solidify soonish and hopefully we'll find the time to get back to you then :)

    Also, while this might sound scrappy, as Greg mentioned in his talk, all of this is still going to be experimental and potentially not covering all use cases. However, we believe that anything of what we have coming is better than what we have now so ... we hope you can hold on for a bit more and a bit of a bumpy ride before things smoothen out :)

    Once again, thanks for all the valuable input so far :)
     
    SugoiDev and Peter77 like this.
  6. EthanHunt

    EthanHunt

    Joined:
    Oct 9, 2012
    Posts:
    9
    Is there a chance that I can get to try it?
     
  7. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,436
    Big news today! I decided to provide Heap Explorer for free to everyone. I might change my mind in the future, I don't know yet.

    You can find a download link to a fully working Heap Explorer build in this thread, very first post.

    Why did I decide to do that? After I watched the Unite 2018 Memory Profiler talk, where Unity Technologies showed what they worked on behind closed doors, I assume Heap Explorer isn't going to be the financial success I believed, because there is now Unity's free memory profiler, that also seems really good and they have more man-power and possibilities to add great stuff, because they provide the memory profiling API in the first place.

    I assume it's going to be difficult to compete with the new memory profiler Unity is going to provide and in this case I decided to spend my time on other things instead.
     
    mh114 and SugoiDev like this.
  8. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,436
    I just released Heap Explorer 2.4 beta, you can find the download link here.

    Changelog
    • Overview View: Fixed negative size display if object group exceeded the maximum int limit.
    • C++ Objects View: Fixed negative size display, if an object group exceeded the maximum int limit.
    • C# Objects View: Fixed negative size display, if an object group exceeded the maximum int limit.
    • Memory Sections: Fixed saving memory sections as file which are larger than 2gb.
    • Loading memory snapshots displays more information about the progress now
     
    SugoiDev likes this.
  9. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,436
    In this video I show you my first iteration on providing an API that allows you do add custom code to Heap Explorer, to create your own Heap Explorer Views and functionality.

    Please let me know what you think.

     
    SugoiDev likes this.
  10. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    92
    Thanks for providing this tool Peter, the alpha builds have been a fantastic help for me - I do apologise for not providing feedback. It is a bit of a shame that the memory profiler initially really struggles with most footprints above a gigabytes or so (in terms of load time during 'receiving memory...' dialog) but I realise that's more due to how Unity provides the data since their memory profiler has the same issue.
     
    Last edited: Aug 13, 2018 at 7:49 AM