-
Notifications
You must be signed in to change notification settings - Fork 824
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
perf: improve performance of PreparedStatement.setBlob, BlobInputStream, and BlobOutputStream with dynamic buffer sizing #3044
Commits on Dec 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7ee6a37 - Browse repository at this point
Copy the full SHA 7ee6a37View commit details -
chore: add src/testFixtures to share test-related code across subproj…
…ects Previously TestUtil.java was declared in src/test/..., and there was no way to reuse it in the benchmarks.
Configuration menu - View commit details
-
Copy full SHA for b4b28bf - Browse repository at this point
Copy the full SHA b4b28bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3dea857 - Browse repository at this point
Copy the full SHA 3dea857View commit details -
Configuration menu - View commit details
-
Copy full SHA for 306e03e - Browse repository at this point
Copy the full SHA 306e03eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d248442 - Browse repository at this point
Copy the full SHA d248442View commit details -
perf: improve performance of BlobInputStream.read(b, off, len) with b…
…uffering reads This reverts commit 3af3b32. Co-authored-by: Dave Cramer <davecramer@gmail.com> Co-authored-by: Brett Okken <brett.okken.os@gmail.com> There are several fixes on top of 3af3b32: 1) The buffer is created lazily, and it is created only in case the number of requested bytes is less than the buffer size 2) "small" read(byte[], int, int) can be buffered as well (e.g. if the buffer size exceeds the requested len) 3) Added locks to read calls for consistency with the locking in mark/reset 4) read(byte[], int, int) should return 0 when len=0 5) refilling the bufer should read "bufferSize" amount rather than "the remaining length"
Configuration menu - View commit details
-
Copy full SHA for ac57b52 - Browse repository at this point
Copy the full SHA ac57b52View commit details -
perf: add buffer scaling to BlobInputStream
We start with 65K buffer, and increase it as the user requests more reads. It reaches reasonable performance for "full stream readouts", and it avoids loading large amount of data when the user needs first bytes only.
Configuration menu - View commit details
-
Copy full SHA for 46aee2c - Browse repository at this point
Copy the full SHA 46aee2cView commit details -
feat: add LargeObject.write(ByteStreamWriter) so multiple buffers can…
… be written at once without copying
Configuration menu - View commit details
-
Copy full SHA for b419750 - Browse repository at this point
Copy the full SHA b419750View commit details -
perf: reduce array allocation in ByteStreamWriter.writeTo(ByteStreamT…
…arget) Previously, the implementation always created a Channel with Channels.newChannel(outputStream), however, OpenJDK (e.g. 22) still allocates arrays. The improvement is to access the arrays in case ByteBuffer allows so. DirectByteBuffer and read-only ByteBuffers forbid array access.
Configuration menu - View commit details
-
Copy full SHA for b97031e - Browse repository at this point
Copy the full SHA b97031eView commit details -
perf: optimize BlobOutputStream.write by buffering small consequent w…
…rites, and allocating the buffer lazily Previously, each each blobOutput.write(byte[], ..) resulted in database call even in the case the write size is small. It could impact cases when users write in small chunks. At the same time, if they already write with big chunks, we should not create a buffer in BlobOutputStream, so now we create the buffer lazily.
Configuration menu - View commit details
-
Copy full SHA for bbcbc55 - Browse repository at this point
Copy the full SHA bbcbc55View commit details -
Configuration menu - View commit details
-
Copy full SHA for e106168 - Browse repository at this point
Copy the full SHA e106168View commit details -
perf: allow BlobOutputStream to resize its buffer up to 512KiB
It enables to cover variety of incoming write requests, and it does not incur much overhead as the buffer grows lazily.
Configuration menu - View commit details
-
Copy full SHA for f7d82b8 - Browse repository at this point
Copy the full SHA f7d82b8View commit details -
doc: update documentation samples for accessing binary data
We suggest using Blob APIs as they are standard.
Configuration menu - View commit details
-
Copy full SHA for e0277f1 - Browse repository at this point
Copy the full SHA e0277f1View commit details