문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top