[
https://issues.apache.org/jira/browse/LUCENE-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723283#action_12723283
]
Simon Willnauer commented on LUCENE-1715:
-----------------------------------------
I is def. not good practice and I agree that a decent VM should not care. In
some environments you don't have a choice (mobile phones for instance) and if
selected pieces of "nulling" code can speed things up we should do it. I will
run a benchmark on a dalivk VM (Android) to show the difference with the
change. I might not have time today or tomorrow though.
This change is not visible to anybody using lucene so to me its not that much
of a deal.
To be honest I'm not a fan of doing that at all but in this case it "could" be
useful in some corner cases but does not harm anybody.
> DirectoryIndexReader finalize() holding TermInfosReader longer than necessary
> -----------------------------------------------------------------------------
>
> Key: LUCENE-1715
> URL: https://issues.apache.org/jira/browse/LUCENE-1715
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Affects Versions: 2.4.1
> Environment: Sun JDK 6 update 12 64-bit, Debian Lenny
> Reporter: Brian Groose
> Assignee: Michael McCandless
> Fix For: 2.9
>
>
> DirectoryIndexReader has a finalize method, which causes the JDK to keep a
> reference to the object until it can be finalized. SegmentReader and
> MultiSegmentReader are subclasses that contain references to, potentially,
> hundreds of megabytes of cached data in a TermInfosReader.
> Some options would be removing finalize() from DirectoryIndexReader (it
> releases a write lock at the moment) or possibly nulling out references in
> various close() and doClose() methods throughout the class hierarchy so that
> the finalizable object doesn't references the Term arrays.
> Original mailing list message:
> http://mail-archives.apache.org/mod_mbox/lucene-java-user/200906.mbox/%[email protected]%3e
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]