Subject Re: [Firebird-Java] Optmizing ResultSet.getBytes() - try #3
Author Roman Rokytskyy
> If fetches first two segments and in case of eof just return the first
> segment. So small blobs will be loaded without additional request for
> the blob-length. And only larger blobs will require additional
> length request round-trip.

Assuming that small blob fits the blobBufferSize, what is the gain here? We
have two roundtrips to the server in former case (one for length, one to
feth the blob) and two roundtrips in latter case (get part 1 and then get
part 2)... for two-blobBufferSize blob (between 32k and 64k) your method is
slower 1.5 times. Do I miss something?

> Are there any chances my patch will be integrated in the main driver
> version ?

Most likely no, unless you prove significant performance gain with this
patch. This patch looks like an attempt to optimize your particular task at
the expense of other cases. I still do not understand, why don't you use
getBinaryStream() method, which should be the most efficient way to fetch
blob.

Roman