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. Doug -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
