On Thu, Feb 11, 2010 at 9:54 AM, Shay Banon <kim...@gmail.com> wrote:
>    I would like to try and improve concurrency in Lucene in several places,
> and thought I would start with FieldCacheImpl. The implementation is heavily
> synchronized on both a global map and on creation values for a pretty
> heavily used path (get).

It really shouldn't be heavily used.
For a sorted search, get() is called once per segment in the index.
There is no synchronization to retrieve per-document values.

We have just barely moved to Java5 though, and so it would probably be
pretty easy to improve the concurrency of the read path if it did
become problematic.

> I think the weak hash map is a good solution (but
> also think that the ability to choose to use soft hash map would add even
> greater flexibility), the problem is that there is no built in concurrent
> weak/soft hash map.

It might be a better idea to have interfaces that allow one to
implement their own policies rather than to try and push all the
different options into Lucene:
https://issues.apache.org/jira/browse/LUCENE-831

-Yonik
http://www.lucidimagination.com

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

Reply via email to