Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 30870 invoked from network); 4 Aug 2010 10:18:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Aug 2010 10:18:45 -0000 Received: (qmail 48396 invoked by uid 500); 4 Aug 2010 10:18:44 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 47865 invoked by uid 500); 4 Aug 2010 10:18:41 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 47857 invoked by uid 99); 4 Aug 2010 10:18:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Aug 2010 10:18:40 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Aug 2010 10:18:37 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o74AIGtg026923 for ; Wed, 4 Aug 2010 10:18:16 GMT Message-ID: <2984254.155511280917096186.JavaMail.jira@thor> Date: Wed, 4 Aug 2010 06:18:16 -0400 (EDT) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2574) Optimize copies between IndexInput and Output In-Reply-To: <31470353.51651280344635760.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895203#action_12895203 ] Michael McCandless commented on LUCENE-2574: -------------------------------------------- Duh sorry you are correct! fileOffset is the "base" of this file within the CFS. Better to finish drinking coffee in the morning before thinking too much... > Optimize copies between IndexInput and Output > --------------------------------------------- > > Key: LUCENE-2574 > URL: https://issues.apache.org/jira/browse/LUCENE-2574 > Project: Lucene - Java > Issue Type: Improvement > Components: Store > Reporter: Shai Erera > Assignee: Shai Erera > Fix For: 3.1, 4.0 > > Attachments: LUCENE-2574.patch, LUCENE-2574.patch, LUCENE-2574.patch > > > We've created an optimized copy of files from Directory to Directory. We've also optimized copyBytes recently. However, we're missing the opposite side of the copy - from IndexInput to Output. I'd like to mimic the FileChannel API by having copyTo on IndexInput and copyFrom on IndexOutput. That way, both sides can optimize the copy process, depending on the type of the IndexInput/Output that they need to copy to/from. > FSIndexInput/Output can use FileChannel if the two are FS types. RAMInput/OutputStream can copy to/from the buffers directly, w/o going through intermediate ones. Actually, for RAMIn/Out this might be a big win, because it doesn't care about the type of IndexInput/Output given - it just needs to copy to its buffer directly. > If we do this, I think we can consolidate all Dir.copy() impls down to one (in Directory), and rely on the In/Out ones to do the optimized copy. Plus, it will enable someone to do optimized copies between In/Out outside the scope of Directory. > If this somehow turns out to be impossible, or won't make sense, then I'd like to optimize RAMDirectory.copy(Dir, src, dest) to not use an intermediate buffer. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org