lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Reusing Document and Field objects
Date Mon, 18 Jan 2010 10:05:33 GMT
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 <emailgane@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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Mime
View raw message