all groups > dotnet interop > november 2006 >
You're in the

dotnet interop

group:

Excel VB.Net add-in: InvokeMember using up 40% of CPU


Excel VB.Net add-in: InvokeMember using up 40% of CPU mxbrunet
11/23/2006 5:18:10 PM
dotnet interop:
Hello everyone,

I'm currently building an Excel add-in using VB.Net and am experiencing
some weird effects on one of my test machines. I am running a series of
demanding calculations on a sheet, and on the affected machine, when
profiled, it shows that System.RuntimeType::InvokeMember uses up close
to 40% of the CPU. The machine is running Office 2003 Pro in french, on
Windows XP (also french) - it's a Pentium M 2.0GHz. However, on my
machine, using an english combination of the same software, the load
does not even come close to 40%.

Would anyone have any thoughts, or leads regarding this issue. I'm
drawing a blank.

Thanks a lot for all your help.

..max

This is one a the sequences that I got from the profiler:

System.Globalization.NumberFormatInfo::get_CurrentInfo
System.RuntimeType::ForwardCallToInvokeMember
System.OleAutBinder::ChangeType
System.Reflection.ParameterInfo::get_ParameterType
System.Reflection.RuntimeMethodInfo::get_ReturnType
System.Reflection.RuntimeMethodInfo::GetParametersNoCopy
System.Runtime.Remoting.Messaging.Message::GetMethodBase
System.Runtime.Remoting.Messaging.Message::InitFields
System.Runtime.Remoting.Proxies.RealProxy::PropagateOutParameters
System.RuntimeType::InvokeMember
System.RuntimeType::IsByRefImpl
System.String::Concat:1
System.String::Equals:1
Re: Excel VB.Net add-in: InvokeMember using up 40% of CPU Cindy M.
11/25/2006 12:44:55 PM
Hi Mxbrunet,

[quoted text, click to view]
Could be an issue with the culture if you developed the solution on an
English machine and are running it on a French one. Excel is extremely
culture-sensitive. Try an MSDN search on terms like: Excel .NET Culture
and see if you turn up anything useful...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
AddThis Social Bookmark Button