问题描述
我目前正在评估的IPC命名管道在Windows上使用.NET / C#。
我目前在看一个生产者,单个消费者的情况。
是否有良好的性能考虑的准则?
在我的第一个测试用例我是比较大的消息VS小消息的速度,似乎是大(64K)的信息将作为快速为小(48字节)的包。这是使用默认参数。我可能会增加更多的测试场景,但是这是一个相当耗时的,因此我找的指导方针。
I am currently evaluating named pipes for IPC on Windows with .NET/C#.
I am currently looking at a single producer, single consumer scenario.
Are there any good performance consideration guidelines?
In my first test case I was comparing the speed of large messages vs small messages and seems to be that large (64k) messages are sent as quick as small (48 Bytes) packages. This was with the default parameters. I might add more test scenarios, but this is quite time-consuming and thus I am looking for guidelines.
推荐答案
我们使用命名管道的在Windows NT 4和Windows 2000真快。
We used Named Pipes on Windows NT 4 and Windows 2000. Really fast.
当我们切换到XP,偶尔会要快,时间缓慢休息。完全相同的code。
When we switched to XP, occasionally it would be fast, the rest of the time slow. With exactly the same code.
我们写我们自己的共享内存的数据传输。认真快。
We wrote our own shared memory data transport. Seriously fast.
这篇关于窗口 - 命名管道用C#性能的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!