Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 97988 invoked from network); 9 Jul 2008 13:00:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 13:00:28 -0000 Received: (qmail 66953 invoked by uid 500); 9 Jul 2008 13:00:27 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 66868 invoked by uid 500); 9 Jul 2008 13:00:27 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 66841 invoked by uid 99); 9 Jul 2008 13:00:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 06:00:27 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 12:59:43 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ED427234C162 for ; Wed, 9 Jul 2008 05:59:31 -0700 (PDT) Message-ID: <2099604638.1215608371970.JavaMail.jira@brutus> Date: Wed, 9 Jul 2008 05:59:31 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3768) Make EmbedBlob.length use skip instead of read In-Reply-To: <604434745.1215602851680.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.