db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3768) Make EmbedBlob.length use skip instead of read
Date Wed, 09 Jul 2008 12:59:31 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612066#action_12612066
] 

Dag H. Wanvik commented on DERBY-3768:
--------------------------------------

Patch look good to me. I only did code inspection, since I am not sure which test
best exercises this code.

The skip semantics in Java input streams is a bit broken (it may return 0 bytes
skipped more or less at will and still be compliant,
cf. http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#skip(long)),
but I see you have coded it safely here, maybe it would be a good idea
to make a utility method for skipping input streams ("skipFully").

+1


> Make EmbedBlob.length use skip instead of read
> ----------------------------------------------
>
>                 Key: DERBY-3768
>                 URL: https://issues.apache.org/jira/browse/DERBY-3768
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3768-1a-length_skip.diff
>
>
> EmbedBlob.length uses read to process the whole Blob when the length has not been encoded
at the head of the stream.
> Using skip instead of read can lead to better performance.
> I also plan to make some minor cleanups under this issue; JavaDoc and to rename a variable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message