Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 51597 invoked from network); 7 Dec 2006 17:12:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2006 17:12:51 -0000 Received: (qmail 80572 invoked by uid 500); 7 Dec 2006 17:12:54 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 80513 invoked by uid 500); 7 Dec 2006 17:12:54 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 80492 invoked by uid 99); 7 Dec 2006 17:12:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 09:12:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 09:12:42 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6DF407142D7 for ; Thu, 7 Dec 2006 09:12:22 -0800 (PST) Message-ID: <19515656.1165511542448.JavaMail.jira@brutus> Date: Thu, 7 Dec 2006 09:12:22 -0800 (PST) From: "Michael Busch (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-739) Performance improvement for SegmentMerger.mergeNorms() In-Reply-To: <19069676.1165511541092.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 [ http://issues.apache.org/jira/browse/LUCENE-739?page=all ] Michael Busch updated LUCENE-739: --------------------------------- Attachment: mergeNorms.patch > Performance improvement for SegmentMerger.mergeNorms() > ------------------------------------------------------ > > Key: LUCENE-739 > URL: http://issues.apache.org/jira/browse/LUCENE-739 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Michael Busch > Assigned To: Michael Busch > Priority: Minor > Attachments: mergeNorms.patch > > > This patch makes two improvements to SegmentMerger.mergeNorms(): > 1) When the SegmentMerger merges the norm values it allocates a new byte array to buffer the values for every field of every segment. The size of such an array equals the size of the corresponding segment, so if large segments are being merged, those arrays become very large, too. > We can easily reduce the number of array allocations by reusing a byte array to buffer the norm values that only grows, if a segment is larger than the previous one. > 2) Before a norm value is written it is checked if the corresponding document is deleted. If not, the norm is written using IndexOutput.writeByte(byte[]). This patch introduces an optimized case for segments that do not have any deleted docs. In this case the frequent call of IndexReader.isDeleted(int) can be avoided and the more efficient method IndexOutput.writeBytes(byte[], int) can be used. > This patch only changes the method SegmentMerger.mergeNorms(). All unit tests pass. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org