We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前TCP模块在小报文的传输性能上不尽如人意。以ping-pong服务为例,由于引入了协程来帮助处理收发工作,协程的换出、唤醒,唤醒条件判断,EventLoop对协程的调度等操作都将以降低网络性能为代价。虽然我个人认为这种开销是提供更高级别代码抽象所必需的,但我们仍然需要使整个框架的性能尽可能接近原生网络操作。
ping-pong
EventLoop
为了解决上述问题,提出了以下几个思路:
Service
pollable
STATUS_HUNG
STATUS_READY
TCPConnection
HandleRead
HandleWrite
The text was updated successfully, but these errors were encountered:
No branches or pull requests
目前TCP模块在小报文的传输性能上不尽如人意。以
ping-pong
服务为例,由于引入了协程来帮助处理收发工作,协程的换出、唤醒,唤醒条件判断,EventLoop
对协程的调度等操作都将以降低网络性能为代价。虽然我个人认为这种开销是提供更高级别代码抽象所必需的,但我们仍然需要使整个框架的性能尽可能接近原生网络操作。为了解决上述问题,提出了以下几个思路:
EventLoop
对象中添加WaitQueue,当一个Service
通过pollable
对象或其它通知机制由STATUS_HUNG
状态变为STATUS_READY
时,将自己加入到该WaitQueue中。该优化应该可以显著减少EventLoop
在轮询Service
对象时产生的开销(尤其是在Service
对象数量较大且活跃度不高的情况下)。(已完成,但是在大量连接活跃的情况下效果一般)TCPConnection
中HandleRead
和HandleWrite
的逻辑,减少不必要的循环(次要)The text was updated successfully, but these errors were encountered: