First time user observations
MartinH
Posts: 82 Bronze 2
Hi:
Today I have been using Ants Memory Profiler 5 extensively, and have 2 observations. I'm not an expert in this field so please forgive my naivety.
1) I would like the Namespace/Class filter combo to retain the value entered between snapshots. Currently every time I take a new snapshot the combo is emptied.
2) I have hit many reported leaks, that are really not leaks, but just pending Garbage Collection. I know this is documented, but it would be nice to have Ants do several GC's before collecting the snapshot. Allow me to (try to) explain. In my program I have an administrative function that does a GC on demand. If I use this option *before* taking a snapshot I don't get any false positives. I'm wondering if my objects are getting promoted to the next GC level with my code, and when Ants does it's own GC it finally collects these recently promoted items and cleans them up before the snapshot. This is the code I execute from within my program:
Could Ants be made to do this prior to snapshot collection?
Regards,
Martin.
Today I have been using Ants Memory Profiler 5 extensively, and have 2 observations. I'm not an expert in this field so please forgive my naivety.
1) I would like the Namespace/Class filter combo to retain the value entered between snapshots. Currently every time I take a new snapshot the combo is emptied.
2) I have hit many reported leaks, that are really not leaks, but just pending Garbage Collection. I know this is documented, but it would be nice to have Ants do several GC's before collecting the snapshot. Allow me to (try to) explain. In my program I have an administrative function that does a GC on demand. If I use this option *before* taking a snapshot I don't get any false positives. I'm wondering if my objects are getting promoted to the next GC level with my code, and when Ants does it's own GC it finally collects these recently promoted items and cleans them up before the snapshot. This is the code I execute from within my program:
GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect();I am not an expert in this field by any stretch of the imagination, but it seems strange that when I execute this code, all the 'Objects on finalizer queue but not disposed' disappear.
Could Ants be made to do this prior to snapshot collection?
Regards,
Martin.
Comments
Thanks for your post and I'll take your points in turn.
1) The default behaviour is to retain the value entered in the filter box in the Class List and should work like that. There are a few times when we clear the filter to avoid confusion. If you are in the Class list and filter, then go to the Summary page and apply an object filter for example and click on one of the Top 5 links to jump to the Class list again - if the class in question has been filtered out from the search we clear the search so we can leave you on the appropriate row. If you don't do anything with ANTS except take 1 snapshot, type a Namespace/class filter and then take another snapshot does this still happen? Does it happen with all Classes? Things like String for example?
2) We thought about having multiple GC's but decided against it in the end as we didn't want to hide potential problems with the Finalizer queue in some applications. We also have to perform a full GC and with large applications these are very expensive. Performing 1 can be painful enough but having multiples would be much worse.
I can only suggest that you take a couple of snapshots and still use snapshot 1 as the baseline and snapshot 3 (for example) as the current snapshot.
As one little piece of advice that might prove helpful, if you check out the advanced filters you will see the filter to hide certain types of GC root. You can uncheck Finalizer queue types there which might help reduce noise.
Hope that helps,
Stephen
Yes, you are right, in most cases the filter is retained, and only when invalid rows would be focused is the filter removed. When you explained it I could see how it was working, and it's perfectly logical. Before your explanation I couldn't make head nor tail of what was going on!
On point 2, I understand your explanation, and like the workaround. The only thing I would like to be able to do is persist the Advanced Filter settings between sessions. For instance if I don't want the Finalizer queue or Static variables I would like to turn these off and use this as my default settings until I change them again.
As far as the expense of GC is concerned, maybe this could also be a configurable option. In my case you have made such a great, fast program that GC is over in a jiffy and taking two consecutive GC would not be a problem, but I understand this may be a problem for larger programs. Anyway, the Advanced Filter options will resolve my problem for now.
All at Red Gate's Ants team must be really proud of such an innovative and cutting edge tool, great work!
Regards,
Martin.
I'll add the two points about configuring the number of GC's to perform and saving Filter settings between sessions to our tracking system for you.
I can see the filter settings being useful for people the more they like the tool and get used to getting the most out of the tool.
Thanks for your very kind words (and in the other post) - really does make it seem all worth it when we get that kind of a reaction and you are right - we are pleased with how V5 has turned out. We are looking towards future versions so as you use the tool if you want to drop a forum post or PM me any comments about how we can improve the tool, either feature wise or to integrate better into your work flow, then please feel free to get in touch any time.
Cheers,
Stephen