lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Busch <busch...@gmail.com>
Subject Re: Payload Loading and Reloading
Date Thu, 29 Nov 2007 23:23:31 GMT
Grant Ingersoll wrote:

> 
> As for the cost of the seeks, why can't we just document that this is
> what is going on and discourage people from doing it?  

I'm just trying to keep SegmentTermPositions#getPayload() as efficient
as possible because it's often used in the most inner loops of scorers.
Keeping track of the start position of the payload adds overhead to that
method. I didn't profile it, maybe the overhead is not significant, but
I still don't see any usecase in which caching the latest payload is not
possible/sufficient. But maybe I'm missing one?


> I think caching it in SegTermPos. is the simplest

I don't think we should do caching here. Again, SegmentTermPositions is
used in inner loops, and often caching the last payload is not needed,
e. g. in BoostingTermQuery.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message