Page 1 of 1

Break down arrays by number of non-null elements

Posted: Thu May 05, 2011 10:15 pm
by orangy
When analyzing complex data structures, it is important to see how arrays are utilized. Having lots of arrays of same type with only single item can suggest a better data structure. I'd like to have a break down tab in type details for arrays, which can show how these arrays are used. That would be useful for analyzing lists, hash sets, dictionaries and other structures based on arrays.

Re: Break down arrays by number of non-null elements

Posted: Fri May 06, 2011 2:48 pm
by Andreas Suurkuusk
You are right, some information about the actual usage of arrays would be very useful. We will add some additional information for each array instance in the Type details view, as well as summary information for all instances of a specific array type. Hopefully we will be able to do this before we release version 4.0.

Re: Break down arrays by number of non-null elements

Posted: Fri Jun 10, 2011 9:24 am
by Andreas Suurkuusk
We released .NET Memory Profiler 4.0 Beta yesterday. This version presents array usage information for specific instances, types, and filters. By default, array usage (i.e. non-zero elements) will be presented as a percentage of the total number of array "slots". You can customize columns in the instance lists, to include fields such as "Total array slots", "Used array slots", and "Unused array slots".