You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2013/10/22 23:05:58 UTC
svn commit: r1534787 -
/lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/TaxonomyIndexArrays.java
Author: shaie
Date: Tue Oct 22 21:05:58 2013
New Revision: 1534787
URL: http://svn.apache.org/r1534787
Log:
minor optimization
Modified:
lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/TaxonomyIndexArrays.java
Modified: lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/TaxonomyIndexArrays.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/TaxonomyIndexArrays.java?rev=1534787&r1=1534786&r2=1534787&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/TaxonomyIndexArrays.java (original)
+++ lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/TaxonomyIndexArrays.java Tue Oct 22 21:05:58 2013
@@ -90,13 +90,15 @@ class TaxonomyIndexArrays extends Parall
// called from the ctor, after we know copyFrom has initialized children/siblings
System.arraycopy(copyFrom.children(), 0, children, 0, copyFrom.children().length);
System.arraycopy(copyFrom.siblings(), 0, siblings, 0, copyFrom.siblings().length);
+ computeChildrenSiblings(copyFrom.parents.length);
+ } else {
+ computeChildrenSiblings(0);
}
- computeChildrenSiblings(parents, 0);
initializedChildren = true;
}
}
- private void computeChildrenSiblings(int[] parents, int first) {
+ private void computeChildrenSiblings(int first) {
// reset the youngest child of all ordinals. while this should be done only
// for the leaves, we don't know up front which are the leaves, so we reset
// all of them.