On Friday 18 January 2008 14:48:21 eks dev wrote:
> would it be possible(I see no reason why not, but ...) to move ScorerDocQueue 
> initialization into constructor, instead of :
> 
>     if (scorerDocQueue == null) {
>       initScorerDocQueue();
>     }
> 
> in next() and skipTo() methods? 

That is quite possible. I did not put this initialisation
in the constructor to avoid calling next() and/or skipTo()
on the subscorers during construction.

The reason for that is that most (perhaps even all) other
Scorer constructors at the time did the same thing, probably
to avoid going to the disk for the posting lists, and possibly
for the proximity info, before actually starting the search
for the query.

At the time there was no benchmark available to test
whether this helps performance so I left it at that,
even though I still don't really like the code you showed
above.

I have not looked at contrib/benchmark yet,
could that provide a way to test this?

Regards,
Paul Elschot



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to