[ 
https://issues.apache.org/jira/browse/LUCENE-5695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5695:
---------------------------------

    Attachment: LUCENE-5695.patch

I tried to make this method only exposed on doc id sets that can be cached by 
introducing a new CacheableDocIdSet that would implement Accountable while 
DocIdSet would not, but this doesn't play nicely with filtering 
(FilteredDocIdSet)...

The attached patch uses the same approach as the previous one except that it 
makes DocIdSet implement Accountable instead of having its own ramBytesUsed 
method. 

> Add DocIdSet.ramBytesUsed
> -------------------------
>
>                 Key: LUCENE-5695
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5695
>             Project: Lucene - Core
>          Issue Type: New Feature
>    Affects Versions: 4.9, 5.0
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-5695.patch, LUCENE-5695.patch, LUCENE-5695.patch
>
>
> LUCENE-5463 tried to remove calls to {{RamUsageEstimator.sizeOf(Object)}} yet 
> it was not always possible to remove the call when there was no other API to 
> compute the memory usage of a particular class. In particular, this is the 
> case for {{CachingWrapperFilter.sizeInBytes()}} that needs to be able to get 
> the memory usage of any cacheable {{DocIdSet}} instance.
> We could add {{DocIdSet.ramBytesUsed}} in order to remove the need for 
> {{RamUsageEstimator}}. This will also help have bounded filter caches and 
> take the size of the cached doc id sets into account when doing evictions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to