开发者

Is there a way to decrease overhead associated with out-proc COM calls?

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 comp开发者_高级运维onent 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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜