lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Hutchison" <ohutchi...@aconex.com>
Subject RE: Poor performance "race condition" in FieldSortedHitQueue
Date Thu, 10 Aug 2006 07:17:51 GMT

> yseeley@gmail.com wrote on 09/08/2006 20:32:20:
> > Heh... interfaces strike again.
> >
> > Well then since we *know* that no one has their own implementation 
> > (because they would not have been able to register it), we 
> should be 
> > able to safely upgrade the interface to a class (anyone 
> want to supply 
> > a patch?)
> >
> > -Yonik
> 
> I'd be happy to do supply this patch - unless someone already 
> works on it (Oliver?).

I was intending to do this but perhaps this is not needed given your
following comments.

> I have one more comment on the cache implementation. It feels 
> to me somewhat not right that a static system wide object 
> (FieldCache.DEFAULT) is managing the field caching for all 
> the indexReaders in the JVM (possibly of different indexes), 
> when in fact there is no dependency/relation/cooperation 
> between the different indexReaders, cache wise. It seems 
> cleaner and simpler to have FieldCacheImpl take care of a 
> single IndexReader, and so have that cache "belong" to the 
> indexReader.
> This would make the cache implementation simpler. 
> Synchronization would only need to be on field values. This 
> way we also get rid of the WeakHashMap (which, btw, I never 
> got to fully trust).

This sounds like a much nicer solution than what I was proposing. I'm still
happy to produce a patch if that would be helpful?

Cheers,

Oliver



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


Mime
View raw message