It should give some perf improvement, reducing GC costs. But you don't need to set field values to null -- just set to the values of the next doc to index, and index with that.
If your machine has available hardware concurrency, using threads should give you even more gains. Mike On Mon, Jan 18, 2010 at 4:47 AM, Ganesh <emailg...@yahoo.co.in> wrote: > Hello all, > > I am indexing millions of documents. The app is single threaded. I need to > create Document and Fields objects repeatedly. I have a thought to create it > once and reuse by setting the field values to null. > > Is this advisable, Will it give any performance improvement? > > Regards > Ganesh > > > Send instant messages to your online friends http://in.messenger.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org