minor optimization

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1534787 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2013-10-22 21:05:58 +00:00
parent 3dea7193c5
commit 884cc9004b
1 changed files with 4 additions and 2 deletions

View File

@ -90,13 +90,15 @@ class TaxonomyIndexArrays extends ParallelTaxonomyArrays {
// 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.