|
|
|
date: Thu, 26 Jan 2006 15:10:37 +0200,
group: microsoft.public.platformsdk.com_ole
back
IDispatch is *slower* from a simple exe, when compared to InvokeMethod called from .NET
Hi all,
I have two applications invoking the very same COM object.
The COM object is an EXE .
The first app is a .NET web-app, hosted by IIS.
Second app is a java application, hosted by Tomcat5.5 .
They do NOT run together - I tested one at the time.
Both apps invoke a method through the IDispatch interface:
The Java, through a JNI module written in CPP, using the
IDispatch->Invoke(),
The .NET is using Type.InvokeMember(), from the .NET framework 1.1 .
OS is Windows server 2003, standard edition.
The problem
==============
Well - .NET works faster!
I call the same method, 100 time, same input.
Using the .NET I get avg time of 1.9 sec, while for the java I get 2.5 secs.
I tried the CoInitialize flags - no luck. (SPEED_OVER_MEMORY, etc.)
I tried calling CoInit foreach thread - no luck.
Does anyone have an idea ?
Please also post to meir@clearforest.com
Thanks
date: Thu, 26 Jan 2006 15:10:37 +0200
author: Meir S., ClearForsest
Re: IDispatch is *slower* from a simple exe, when compared to InvokeMethod called from .NET
I do not know Java, but if you will call a method through IUnknown and not
throught IDispatch.Invoke it will work faster.
"Meir S., ClearForsest" wrote in message
news:unQAonnIGHA.2896@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> I have two applications invoking the very same COM object.
> The COM object is an EXE .
> The first app is a .NET web-app, hosted by IIS.
> Second app is a java application, hosted by Tomcat5.5 .
> They do NOT run together - I tested one at the time.
>
> Both apps invoke a method through the IDispatch interface:
> The Java, through a JNI module written in CPP, using the
> IDispatch->Invoke(),
> The .NET is using Type.InvokeMember(), from the .NET framework 1.1 .
>
> OS is Windows server 2003, standard edition.
>
> The problem
> ==============
> Well - .NET works faster!
> I call the same method, 100 time, same input.
> Using the .NET I get avg time of 1.9 sec, while for the java I get 2.5
> secs.
>
> I tried the CoInitialize flags - no luck. (SPEED_OVER_MEMORY, etc.)
> I tried calling CoInit foreach thread - no luck.
>
>
> Does anyone have an idea ?
> Please also post to meir@clearforest.com
>
>
> Thanks
>
>
>
>
date: Wed, 15 Feb 2006 09:56:08 +0200
author: Max please@newsgroup
|
|