forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coallesce small buffers to send them as one
Summary: The new async client function to write a vector of buffers can cause lots of small buffers to go through SSL encoding which can be expensive. This diff attempts to combine the first portions (which are most likely to be small) into a single buffer. The original code already had a small buffer to build the header into. This expands that buffer and then continues copying data into it until the next buffer won't fit. This diff also avoids adding 0 length buffers which could occur with the original implementation. Note that this buffer coalescing is disabled when the overall packet is very large and gets turned off part way through if network compression is enabled. Differential Revision: D21867050
- Loading branch information
Showing
2 changed files
with
75 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters