lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <>
Subject Re: Poor performance "race condition" in FieldSortedHitQueue
Date Thu, 10 Aug 2006 04:28:49 GMT 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

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).


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

View raw message