Comments
5 comments
-
Hello Webview,
I have a suspicion that this has something to do with the threading model of the COM component that you had called. Like the method that you had called in the COM object had kicked off a thread and returned a result back to the Interop dll right away. Could that be the case? -
It doesn't appear to be multi-threaded in that the method call is synchronous and will wait until the interop code returns. I wonder if the nature of COM messaging (way down deep it uses the old windows message--i.e. wndprocs and the like). I wonder if this is affecting it?
Should ANTS handle profiling COM interop (or any interop) for that matter? -
Hi there,
we have fixed the timings for COM libraries in v2.1 of the product. If you are interested in having a look at the beta of v2.1 just send a quick mail to support@red-gate.com
Thanks,
Tom Harris
Red Gate Software Ltd -
The COM timings have been corrected in version 2.5, which is now publicly available. Although ANTS Profiler still cannot profile managed code, the time spent in Interop methods is quite a bit more accurate because it will show the amount of time spent in the COM layer before returning.
-
Hi.
Well - I use version 2.6.0 build 62
and I still get a very long time profiling a .NET application using a Word.Interop.
About 10 sec. each time - and without Ants using my own custom made loggning this takes under 1 sec!
Any ideas?
Below is listet the code which take approx. 10 sec. to profile.
(I'm using Interop.Word.dll verison 8.1.0.0 and
Interop.Office.dll version 2.1.0.0)
mWordApp = new Application();
mWordApp.Visible = false;
mWordApp.Options.CheckSpellingAsYouType = false;
mWordApp.Options.CheckGrammarWithSpelling = false;
mWordApp.Options.CheckGrammarAsYouType = false;
mWordApp.Options.CheckHangulEndings = false;
best regards Bo.
Add comment
Please sign in to leave a comment.
For example:
MyFunc() calls (through COM interop) a Word function that takes 10 secs to execute.
ANTS reports that MyFunc took like 0.002 seconds to execute. It looks like this time is from the method entry point to the time it crosses the COM interop code, when in reality, it should tell me how long MyFunc() took to run (from entry to exit).
Is there possibly a setting I can enable where ANTS will tell me the total elapsed time the function takes to execute regardless of what is being called inside the .NET method?