-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
perf(net): improve overall multiplex performance for rlpx satellite stream #13861
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, thanks for picking this up.
this already looks good.
still have some nits, and we can now remove the poll_ready + send calls from the stream impl entirely
thank @mattsse for review, i just updated |
also help me review this PR @mattsse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no that we do this on the sink impl, we can remove
reth/crates/net/eth-wire/src/multiplex.rs
Lines 469 to 493 in cd44fc3
loop { | |
match this.inner.conn.poll_ready_unpin(cx) { | |
Poll::Ready(Ok(())) => { | |
if let Some(msg) = this.inner.out_buffer.pop_front() { | |
if let Err(err) = this.inner.conn.start_send_unpin(msg) { | |
return Poll::Ready(Some(Err(err.into()))) | |
} | |
} else { | |
break | |
} | |
} | |
Poll::Ready(Err(err)) => { | |
if let Err(disconnect_err) = | |
this.inner.conn.start_disconnect(DisconnectReason::DisconnectRequested) | |
{ | |
return Poll::Ready(Some(Err(disconnect_err.into()))) | |
} | |
return Poll::Ready(Some(Err(err.into()))) | |
} | |
Poll::Pending => { | |
conn_ready = false; | |
break | |
} | |
} | |
} |
seem look good, please help me review @mattsse |
Closes #13856