lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: release & migration plan
Date Tue, 13 Jul 2004 16:18:36 GMT
Maxim Patramanskij wrote:
> Since the changes, proposed and made by Aviran to FieldInfos class
> made Lucene java 1 incompatible, but can give us some reasonable
> performance gain, shouldn't we go ahead with the whole Hashtable ->
> HashMap and Vector -> ArrayList replacement arround the code to have
> even more performance in other places?

This cannot be done blindly.  Thread safety needs to be carefully 
considered in each case.  For example, if, when used by an IndexReader, 
the Hashtable or Vector is only modified under a constructor, and 
treated as read-only subsequently, then it is probably safe to make this 
conversion.  But if it is modified while searching, then access must be 
synchronized.  IndexWriter is less-frequently used in a multi-threaded 
manner, but is also written to be thread-safe, so uses in IndexWriter 
need to be closely examined too.  And so on.

Doug

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


Mime
View raw message