lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: CachedSearcher
Date Tue, 16 Jul 2002 16:56:13 GMT
Scott Ganyo wrote:
> I'd like to see the finalize() methods removed from Lucene entirely.  In a
> system with heavy load and lots of gc, using finalize() causes problems.
 > [ ... ]
 > External resources (i.e. file handles) are not released until the reader
> is closed.  And, as many have found, Lucene eats file handles for breakfast,
> lunch, and dinner.

Lucene does open and close lots of files relative to many other applications, 
but the number of files opened is still many orders of magnitude less than the 
number of other objects allocated.  I would be very surprised if finalizers for 
the hundreds of files that Lucene might open in a session would have any 
measurable impact on garbage collector performance given the millions of other 
objects that the garbage collector might process in that session.

As usual, one should not make performance claims without performing benchmarks. 
  It would be a simple matter to comment out the finalize() methods, recompile 
and compare indexing and search speed.  If the improvement is significant, then 
we can consider removing finalize methods.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message