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

Dawid Weiss commented on LUCENE-5197:
-------------------------------------

I guess you'd have to modify RamUsageEstimator to allow a tree-visitor pattern, 
then you'd be able to only account for the nodes that matter (or ignore those 
you know shouldn't be counted).

This also has some caveats -- like references to things that shouldn't be 
counted (thread locals reaching out to thread instances, loggers reaching out 
to pretty much everything...). Having said that, I can see how such an 
implementation can be tested to detect things like this early, which with the 
manual counting may be a problem.

Again -- I'm not saying "no", I'm just expressing concern about the size and 
complexity of the patch. If there's a simpler way to do it that is 
performance-acceptable we should probably follow Occam's razor...
                
> Add a method to SegmentReader to get the current index heap memory size
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-5197
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5197
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/codecs, core/index
>            Reporter: Areek Zillur
>         Attachments: LUCENE-5197.patch
>
>
> It would be useful to at least estimate the index heap size being used by 
> Lucene. Ideally a method exposing this information at the SegmentReader level.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to