Subject Re[2]: [Firebird-Java] Optmizing ResultSet.getBytes() - try #3
Author Alexey Panchenko
Roman Rokytskyy wrote:

> part 2)... for two-blobBufferSize blob (between 32k and 64k) your method is
> slower 1.5 times. Do I miss something?

I think that sending 32k buffer require a bit more time than sending a
few bytes of the blob length. So most probably it will be slower about
1.1 times. But this coefficient includes only network time, and does
not include the effect of more optimized memory usage. Which is the
factor I want to have optimized.

> Most likely no, unless you prove significant performance gain with this
> patch.

Do you want me to publish benchmark application repeating blob fetches
for different blob sizes ?

> 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.

1) BLOB = Binary large object. I want the code to be optimized for
fetching LARGE blobs. I want it to be optimized by memory usage also,
so fetching MULTIPLE LARGE blobs will not produce a lot of garbage and
slowdown the whole system.

2) There are 3rd party libraries like Hibernate, which already use
getBytes() to fetch blob fields.

Can we have the compromise by adding a parameter to the connection
string or do you want to benchmark it first ?

--
Best regards,
Alexey mailto:alex+news@...