codec send Message
instead of Vec<Message>
#1466
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
blocked on:
#1467
#1465
The first commit is performance neutral but for some reason the 2nd commit is heavily regressive:
From looking at a profiler we spend a lot more time in the server.rs spawn_read_write_tasks writev
I think yielding control back to the executor is preventing us from properly batching our writes, resulting in more total time spent in writev.
I have no idea why its only the writev to the client that is affected.
Oh! Maybe the writes to the DB were never batched properly?
Yep thats it!
in_w is sent a vec of a single item here.
So, we really do want to send a full message batch to the encoder.
But! If we fix the encoding for the DB connection we will have a big performance win.