Subject | Re[2]: [Firebird-Java] Optmizing ResultSet.getBytes() - try #3 |
---|---|
Author | Alexey Panchenko |
Post date | 2006-04-19T05:35:48Z |
Roman Rokytskyy wrote:
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.
for different blob sizes ?
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@...
> part 2)... for two-blobBufferSize blob (between 32k and 64k) your method isI think that sending 32k buffer require a bit more time than sending a
> slower 1.5 times. Do I miss something?
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 thisDo you want me to publish benchmark application repeating blob fetches
> patch.
for different blob sizes ?
> This patch looks like an attempt to optimize your particular task at1) BLOB = Binary large object. I want the code to be optimized for
> 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.
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@...