lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Busch (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-739) Performance improvement for SegmentMerger.mergeNorms()
Date Fri, 08 Dec 2006 00:43:22 GMT
    [ http://issues.apache.org/jira/browse/LUCENE-739?page=comments#action_12456654 ] 
            
Michael Busch commented on LUCENE-739:
--------------------------------------

Thanks Yonik! Well then, let's commit it? ;-)

> 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


Mime
View raw message