[jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-17 Thread Yonik Seeley (JIRA)
[ http://issues.apache.org/jira/browse/LUCENE-443?page=all ] Yonik Seeley resolved LUCENE-443. - Fix Version/s: 2.1 Resolution: Fixed Assignee: Yonik Seeley Thanks! I just committed this. > ConjunctionScorer tune-up > ---

Re: [jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-23 Thread Peter Keegan
I did some profile testing with the new ConjuctionScorer in 2.1 and discovered a new bottleneck in ConjunctionScorer.sortScorers. The java.utils.Arrays.sort method is cloning the Scorers array on every sort, which is quite expensive on large indexes because of the size of the 'norms' array within,

Re: [jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-23 Thread Yonik Seeley
On 10/23/06, Peter Keegan <[EMAIL PROTECTED]> wrote: I did some profile testing with the new ConjuctionScorer in 2.1 and discovered a new bottleneck in ConjunctionScorer.sortScorers. The java.utils.Arrays.sort method is cloning the Scorers array on every sort, Huh... that's interesting. I wond

Re: [jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-23 Thread Paul Elschot
On Monday 23 October 2006 22:12, Peter Keegan wrote: > I did some profile testing with the new ConjuctionScorer in 2.1 and > discovered a new bottleneck in ConjunctionScorer.sortScorers. The > java.utils.Arrays.sort method is cloning the Scorers array on every sort, > which is quite expensive on la

Re: [jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-23 Thread Peter Keegan
Huh... that's interesting. I wonder why Arrays.sort(int[]) is all in-place but sort(Object[]) is not. I was wondering that myself. Here's the code: public static void sort(T[] a, Comparator c) { T[] aux = (T[])a.clone(); if (c==null) mergeSort(aux, a, 0, a.length, 0);

Re: [jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-23 Thread Peter Keegan
Isn't the issue the creation of a new Comparator each time the scorers are sorted? That could be easily fixed by keeping single comparator around to do all the work. Yes, it's the Comparator, but I think even if you kept it around, the Array.sort would still clone the Scorers, no? Peter On 10/2

Re: [jira] Resolved: (LUCENE-443) ConjunctionScorer tune-up

2006-10-23 Thread Peter Keegan
Can you open a JIRA issue for this? Yes, it's: http://issues.apache.org/jira/browse/LUCENE-693 Peter