jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Inefficient/useless UUIDDocId cache ( was : Search performance : MultiIndex)
Date Mon, 12 Nov 2007 10:43:41 GMT

> Marcel Reutegger wrote:
> caching the combined index reader works as long as there are 
> no changes, but that is rarely the case. things in a 
> workspace will change frequently, which means with every 
> change the UUIDDocId must be recalculated.

Yes, I realized this but thought it would at least already be better
when only reading happens for some time

> instead of keeping a reference to the combined index reader 
> the UUIDDocId should rather keep a reference to the reader of 
> the index segment, which returned the document number for the 
> uuid. with this change the document number does not have to 
> be recalculated just because the combined index reader changed.

Yes, this is a very nice optimalisation. I boils down IIUC, that only
the readers that where involved during a commit would have to be
re-calculated if getDocumentNumber is called, right? And, obviously,
most of the time the small indexes are changed, implying that the major
part of the getDocumentNumber are still being cached. 

> Please create two separate issues. We can get rid of the uuid 
> string independent
>   of the other changes/optimizations.

Okay. I'll file two issues this afternoon. Will create patches later
today for both of them (both are very simple)

Regards Ard

> regards
>   marcel

View raw message