forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pgwire: pre-allocate a temporary buffer to use when serializing array…
…s/tuples A new "writeBuffer" was being allocated every time when serializing an array/tuple. This is very heavy and unecessary. To address this, this patch creates a temporary buffer in the existing "writeBuffer" struct which is used specially for serializing array/tuple. This is more efficient than allocating a new temporary "writebuffer" every time. Release note (performance improvement): A special temporary buffer was created to be used only for serializing arrays/tuples. This provided better performance. The increase in performance was seen by running the BenchmarkEncodings benchmark for arrays and tuples. Fixes: cockroachdb#21711
- Loading branch information
1 parent
a142e39
commit ea1ab93
Showing
2 changed files
with
95 additions
and
40 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