Red Gate forums :: View topic - Very Slow Capture on large Managed C++ project
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Profiler Previous Versions
ANTS Profiler Previous Versions forum

Very Slow Capture on large Managed C++ project

Search in ANTS Profiler Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
shopsinc



Joined: 26 Feb 2009
Posts: 2

PostPosted: Thu Feb 26, 2009 5:55 pm    Post subject: Very Slow Capture on large Managed C++ project Reply with quote

I am using Ants v4 to profile an app that makes calls into a very large managed c++ project.

There is a particular method I'm calling that exercises quite a bit of this code. The first time I call this method it is taking roughly 40 minutes to profile (this method takes about 10 seconds to run when outside of the profiler). The second time I call the method it is only taking roughly a minute to profile.

When I initially ran these tests with the profiler it said that virtually all of the time was being taken in JIT Overhead.

This makes sense as there is a lot of code to JIT. However, I've compiled the bytecode with ngen (with profiler scenario turned on) and it still takes just as long. But the method that now takes all of the time is <Module>._initterm_m(void**()* pfbegin, void* *()* pfend).

Do you have any tips on how I can speed this up? Or possibly start profiling after this initial load? It's almost impossible to use the profiler in this situation...
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Thu Feb 26, 2009 7:26 pm    Post subject: Reply with quote

Hi,

You can change the level of profiling in the opening dialog to reduce overhead - line level which is the default can also be the most expensive although the case you describe is extreme by the sounds of it.

Switch to the 'Method Level Timing; only methods with source' profiling mode and it should improve.

Stephen
Back to top
View user's profile Send private message
shopsinc



Joined: 26 Feb 2009
Posts: 2

PostPosted: Thu Feb 26, 2009 8:04 pm    Post subject: Reply with quote

I have tried that and it makes very little difference. I've just installed an old ants v3 build and tried using that. When I disable profiling the first time I call the method, then enable it the second time, everything works fine and it takes about 30 seconds....
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Thu Feb 26, 2009 8:49 pm    Post subject: Reply with quote

That's a bit strange then.

I'll check with the developer tomorrow for possible explanations for this and get back to you.

Cheers,

Stephen
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Fri Feb 27, 2009 3:00 pm    Post subject: Reply with quote

Hi,

could you try one thing for me - delete all the PDB files of anything which you are not interested in seeing the source code for and then trying to line-level profile again.

Thanks,

Stephen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group