如何提高外部API的COM Server的性能? [英] How to raise Performance of COM Server of external API ?

查看:84
本文介绍了如何提高外部API的COM Server的性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我已经在此处描述了我的问题.

简短说明:我正在使用DataProvider中的API来编写金融证券交易所分析程序.我可以使用多个工具对象填充外部API提供的DataStream对象.每当交易所上相应工具的价格出现新变化时,此DataStream就会触发事件.

如果DataStream中有许多(> 50.000)对象,有时它将停止触发事件.它与我的代码无关,我已经测试了代码性能,看起来还不错.因此,外部API的这种"COM-Server"就是这种行为的原因.我注意到,该问题将在具有较旧CPU的系统上更经常发生.因此,它也与CPU功率有关.

有什么方法可以影响COM Server的性能吗?

任何建议都会受到赞赏.

Hi there,

I already described my problem here.

Short description: I am using an API from an DataProvider to program a financial stock exchange analysis program. I can fill a DataStream Object provided by the external API with multible Instrument Objects. This DataStream fires events every time a new price occurs for the respective instrument on the exchange.

If there are many (>50.000) Objects in the DataStream, sometimes it will stop firing the events. It has nothing to do with my code, I already tested the code performance and it looks ok. So somehow this "COM-Server" of the external API is the reason for this behaviour. I noticed, that the problem will occur more often on systems with older CPUs. So it also has something to do with the CPU Power.

Is there any way to influence the performance of the COM Server? Something in the Network Preferences?

Any suggestions would be appreciated.

推荐答案

您没有说如何实例化COM Server,但是如果它是一个进程外服务器,或者是您从远程计算机访问的组件,并且您是该服务器的客户端,那么COM库使用RPC协议在两者之间来回传输数据机器.您可以参考:网络协议 [标准封送处理 [
You don''t say how you instantiate the COM Server, but if it''s an out-of-process server, or a component that you access from a remote machine, and you are a client of that server, then the COM library uses the RPC protocol to transfer the data back and forth between the two machines. You might refer to: The Network Protocol[^], a chapter from the book "Inside COM+", which describes the methods COM uses to communicate with a DCOM component on a remote machine. Also, from the same book, Standard Marshaling[^], explains the actual COM Library mechanisms involved in managing the proxy and stub architecture.
If you are accessing an out-of-process server, then that is definitely your bottleneck, and not the code that you posted in the C# Forum.


您的推理并非如此正确的.我已经与COM合作15年了,我知道它在哪里可以失败.过去,我会进行测试,事件触发的方式超过10亿次,而不会失败一次. Somethign在您这边出错了,我建议您调查一下.该问题在批准后出现的事实. 50,000个事件不是开始为此责怪COM的借口.

我无法提供您提供的尽可能少的详细信息.
Your reasoning isn''t correct. I''ve been working with COM for 15 years, and i know where it can and cannot fail. In the past i''d run tests with events firing way over 1 billion times, without failing once. Somethign is going on wrong on your side there, and i suggest that you looking into it. The fact that the problem manifests after appr. 50,000 events isn''t an excuse to start blaiming COM for it.

I cannot suggest more with as few details as you provided.


这篇关于如何提高外部API的COM Server的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆