lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.elschot (JIRA)" <>
Subject [jira] Commented: (LUCENE-365) [PATCH] Performance improvement to DisjunctionSumScorer
Date Thu, 06 Apr 2006 07:02:06 GMT
    [ ] 

paul.elschot commented on LUCENE-365:

For the normal case with only one required subscorer this patch is ok., but for the case with
more required subscorers, a better implementation is possible.

This would use an array for the required number of subscorers just like ConjunctionScorer,
and a scorer queue for the remaining ones.
This has the additional advantage that calling score() on the subscorers can be delayed until
are enough matching subscorers.

As LUCENE-413 seems to be fixed, and BooleanScorer2 can easily distinguish the cases of one
more required subscorers,  (there are quite a few cases already there...) I think ScorerDocQueue
can go ahead whenever practical.

> [PATCH] Performance improvement to DisjunctionSumScorer
> -------------------------------------------------------
>          Key: LUCENE-365
>          URL:
>      Project: Lucene - Java
>         Type: Bug

>   Components: Search
>     Versions: CVS Nightly - Specify date in submission
>  Environment: Operating System: other
> Platform: Other
>     Reporter: paul.elschot
>     Assignee: Lucene Developers
>  Attachments:,,,
> A recent profile of the new BooleanScorer2 showed that 
> quite a bit of CPU time is spent in the advanceAfterCurrent method 
> of DisjunctionScorer, and in the PriorityQueue of scorers that 
> is used there. 
> This patch reduces the internal overhead of DisjunctionScorer 
> to about 70% of the current one (ie. 30% saving in cpu time). 
> It also reduces the number of calls to the subscorers, but 
> that was not measured. 
> To get this, it was necessary to specialize the PriorityQueue 
> for a Scorer and to add move some code fragments from DisjunctionScorer 
> to this specialized queue.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message