views:

42

answers:

2

Our program consumes an out-proc COM server and makes thousands of calls on its interfaces. This takes very very long time - like a minute for about 50k calls. The COM component vendor says that the calls are very fast by themselves and that the problem is in the overhead associated with out-proc calls.

Is there anything that can be tuned to reduce the overhead in such cases?

+2  A: 

Look for a way to reduce a number of calls. For example, if interface allows, you might consider replacing code like:

for a in c..d { array[a]=obj.get(a) }

with:

obj.getArray(array)

Basilevs
+2  A: 

I really dont think there is much that can be done without help from the vendor. Since by its nature an out-of-process com object is going to require much more marshalling etc than an in-process one.

There are two possible options if you can get the the vendor to help.

  1. Ask them to provide you with an in-process version (dll) which you can then host in COM+ and generate multiple instances (if appropriate) and could help.
  2. Do as suggested by BAsilevs and ask them to update the api so you can make fewer call thereby reducing the traffic.

The main thing for saving the kind of traffic you are tallking about is COM+ but this cant be used with an out-of-process COM object.

Toby Allen

related questions