-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
pgwire: too much work for serializing arrays #21711
Comments
Good point - did you notice any performance issues stemming from this, or did you just notice an inefficiency in the code? |
I was just trolling the code cause I'm changing the ctor for these buffers |
@jordanlewis what project do you reckon this belongs to? |
@jordanlewis Is anyone working on this issue? If not, I would like to take on it as my first issue. 😄 |
go ahead. |
cc @rafiss for re-triage |
@lamnguyen21 thanks for your interest! some pointers:
|
…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
…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
…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
…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
We allocate a new
writeBuffer
every time we need to serialize an array. This seems very heavy. Can't we do something else? Like use the connectionswriteBuffer
or keep around a specially built one?cockroach/pkg/sql/pgwire/types.go
Line 391 in c4bd367
The text was updated successfully, but these errors were encountered: