You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With new write-through API functionality of rustls 0.23 (rustls/rustls#1640), this library can implement poll_write_vectored on stream and gain a significant performance boost.
This won't help in our particular case as our underlying streams don't provide an implementation of vectored writes - this is caused by some known issues such as us relying solely on tungstenite-rs which was written under an assumption that streams implement Read + Write, instead of providing a sans-io implementation. But once we update the API surface of the tungstenite-rs, this would certainly be possible!
This is also one of the reasons why alternatives such as fastwebsockets are more performant.
This could indeed be implemented with future versions of Rust. One needs something like https://rust-lang.github.io/rfcs/1210-impl-specialization.html in order to switch between implementations for different streams. With that, one could implement a simple I/O for generic streams and scatter-gather I/O for less generic ones. With the current version of Rust it is however impossible to use the vectored feature of some advanced streams without losing the possibility to work with any stream that has Read+Write.
With new write-through API functionality of rustls 0.23 (rustls/rustls#1640), this library can implement
poll_write_vectored
on stream and gain a significant performance boost.Basically, this is the same issue as in tokio-rustls rustls/tokio-rustls#26, which has a current PR to solve it rustls/tokio-rustls#45
The text was updated successfully, but these errors were encountered: