Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us