Skip to content
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

Add WebSocketConfig::read_buffer_size default 128 KiB #468

Merged
merged 2 commits into from
Dec 15, 2024

Conversation

alexheretic
Copy link
Contributor

  • Add WebSocketConfig::read_buffer_size default 128 KiB.
  • Make WebSocketConfig non-exhaustive & add builder style construction fns.
  • Remove deprecated WebSocketConfig::max_send_queue.

Note this also doubles the read buffer len in #465 from 64 -> 128k providing a boost in bench perf, since the bench has 100k messages ready to go.

The bench is a bit artificial to deduce the best default, but 128k is the current default for the write buffer so seems a good place to start.

read+unmask 100k small messages (server)
                        time:   [7.5623 ms 7.5700 ms 7.6009 ms]
                        change: [-3.5836% -3.0376% -2.4881%] (p = 0.07 > 0.05)

read 100k small messages (client)
                        time:   [7.1301 ms 7.1658 ms 7.1747 ms]
                        change: [-4.4713% -2.4551% -0.3652%] (p = 0.13 > 0.05)

Make `WebSocketConfig` non-exhaustive & add builder style construction fns
Remove deprecated `WebSocketConfig::max_send_queue`
@daniel-abramov daniel-abramov merged commit bb6f712 into snapview:master Dec 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants