ChainSafe / js-libp2p-yamux

Typescript implementation of Yamux
Other
10 stars 8 forks source link

fix: establish RTT at start of connection #64

Closed achingbrain closed 7 months ago

achingbrain commented 7 months ago

A connection ping is required to establish the RTT - as implemented the ping only happens during the keep alive loop that doesn't kick in until after 30s by default.

The change is to ping immediately on sinking a source - this means we are more likely to increase the send window on the remote which increases the amount of data they send and as such, throughput.

achingbrain commented 7 months ago

I think this is one of the causes of the speed discrepancy between the js yamux and mplex implementations.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Files Coverage Δ
src/muxer.ts 90.46% <100.00%> (+1.39%) :arrow_up:
src/stream.ts 98.01% <100.00%> (ø)
test/stream.spec.ts 100.00% <100.00%> (ø)

:loudspeaker: Thoughts on this report? Let us know!

github-actions[bot] commented 7 months ago

:tada: This PR is included in version 5.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: