Hi all,
First let me explain what I found out. I'm running Lucene on a 4 CPU server.
While doing some stress tests I've noticed that searching threads are
blocked on the method: public FieldInfo fieldInfo(int fieldNumber)
This causes for a significant cpu idle time. I noticed that the class
org.apache.lucene.index.FieldInfos uses private class members Vector
byNumber and Hashtable byName, both of which are synchronized objects. By
changing the Vector byNumber to ArrayList byNumber I was able to get 110%
improvement in performance (number of searches per second).
 
My question is: do the fields byNumber and byName have to be synchronized
and what can happen if I'll change them to be ArrayList and HashMap which
are not synchronized ?

Reply via email to