What is meant by optimizing tungstenite for performance?

This example shows a websocket client: https://github.com/sdroege/async-tungstenite/blob/main/examples/client.rs

Which notes:

//! Note that this is not currently optimized for performance, especially around
//! buffer management. Rather it's intended to show an example of working with a
//! client.

Does it mean that this example should not be used in production?
What is meant by buffer management? Is it essential?

I think that's an exaggeration. The code is okay.

Rustaceans are often very ambitious, and want all the code to be the fastest possible, with zero allocations, zero copying, zero indirections, etc. But Rust is fast enough that even a simplified example is good enough.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.