[ 
https://issues.apache.org/jira/browse/LUCENE-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723289#action_12723289
 ] 

Earwin Burrfoot commented on LUCENE-1715:
-----------------------------------------

There's in fact one case where nulling harms. I'm going to try making as much 
of IR as possible immutable and final. Load everything upfront on 
creation/reopen (or don't load if IR is created for, say, merging). Unlike 
nulling references, making frequently accessed fields final does have an impact 
under adequate JVMs.

Well, nulling can be added now and removed when/if I finish my IR stuff.

> 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/%3c7a5cb4a7bbce0c40b81c5145c326c31301a62...@numevp06.na.imtn.com%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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to