Snapshots very slow during "Filling Cache"

Memory profiling for .NET developers

Moderators: StephenC, AndrewH, melvyn.harbour

Snapshots very slow during "Filling Cache"

Postby Cheetah » Mon Nov 29, 2010 7:00 pm

Giving 7.0.0.556 a whirl, and just starting out, I'm noticing what is at best a major annoyance: Every snapshot, not just the first, takes about 3 minutes (!), almost all of that spent "Filling Cache" and during which time it is consuming 100% of one CPU core, roughly 80% of which shows as kernel time.

This is profiling a fairly large 64 bit WPF app, if that's relevant.

Once it's done with that, the UI is approximately as fast/responsive as v6 was on the same app.
Cheetah
 
Posts: 12
Joined: Fri Jan 04, 2008 11:42 pm

Postby StephenC » Tue Nov 30, 2010 1:49 pm

That's very strange - if anything it should be faster in V7.

What happens when you are profiling with V6 and you measure how long it takes to complete a snapshot?

What sort of time difference are we talking about when profiling the app under the exact same conditions?
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby Cheetah » Tue Nov 30, 2010 5:14 pm

Taking a snapshot with V6 takes about 5 seconds. Assuming that the messages displayed by the profiler while it takes and analyzes the snapshot have roughly the same meaning between V6 and V7, nearly all the extra time taken by V7 is in that "Filling Cache" step.

I should also note that the app being profiled continues running during that filling cache step, and some (but not all) of the ANTS UI remains responsive. For example, I can zoom the counters strip in and out, but I cannot scroll it left / right. I can also take another snapshot while the Filling Cache step runs.

As far as slowdown to the app being profiled, neither V6 nor V7 causes a noticeable slowdown. However, the problem I'm debugging now doesn't involve any of the CPU intensive parts of the app, so a for a slowdown to be noticeable, it would have to be severe enough to impact basic UI responsiveness.
Cheetah
 
Posts: 12
Joined: Fri Jan 04, 2008 11:42 pm

Postby AndrewH » Fri Dec 10, 2010 11:43 am

We haven't been able to reproduce this here: with our tests, ANTS 7 doesn't seem to be any slower than ANTS 6 and is faster in many cases.

The 'filling cache' stage is really just the message that ANTS displays before moving on to doing some real work (which will display a different message), so this is probably a sign that something has stalled somewhere.

The latest build (634) has been changed so that it displays a specific message instead of the 'Filling Cache' message: could you try it out and see what it's displaying when it gets stuck?
Andrew Hunter
Software Developer
Red Gate Software Ltd.
AndrewH
 
Posts: 134
Joined: Thu Aug 17, 2006 3:44 pm

Postby Cheetah » Fri Dec 10, 2010 4:18 pm

I just tried with the latest build, and the step it sticks on is "Filling object graph"

I tried with a very small console app, and it did not exhibit the slowness.

I tried with a medium size (compared to the first app) WPF app, and it too sat for a bit on the "Filling object graph", but not for anywhere near as long.

In case this is just an issue of scale, the "big" application I started with, once it does finish taking and loading the snapshot, it shows 5710 classes and 14061 instances. Saving the results with just that one snapshot results in a 222 MB file.
Cheetah
 
Posts: 12
Joined: Fri Jan 04, 2008 11:42 pm

Postby AndrewH » Fri Dec 10, 2010 6:09 pm

Hmm, I think I might know why that's happening: the profiler is reading the field values for all of the objects while it's searching for the names of dependency properties. I think I've fixed this behaviour now. Can you try build 649, which should be up at http://downloads.red-gate.com/ANTSProfi ... .0.649.exe and see if it still suffers from this issue?
Andrew Hunter
Software Developer
Red Gate Software Ltd.
AndrewH
 
Posts: 134
Joined: Thu Aug 17, 2006 3:44 pm

Postby Cheetah » Fri Dec 10, 2010 10:15 pm

That fixed it, thank you :)
Cheetah
 
Posts: 12
Joined: Fri Jan 04, 2008 11:42 pm


Return to ANTS Memory Profiler 7 EAP

Who is online

Users browsing this forum: No registered users and 0 guests