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

Adrien Grand updated LUCENE-4121:
---------------------------------

    Attachment: LUCENE-4121.patch

First version of the patch.

I first tried to replace the size methods by either {{memSize}} or {{diskSize}} 
depending on what they measured. But I was not happy with the fact that some 
{{diskSize}} methods might actually measure in-memory sizes when the underlying 
directory implementation is a {{RAMDirectory}}. So I ended up with 3 method 
names:
 * memSize, for in-memory usage,
 * diskSize, for on-disk size (hybrid data structures may implement both 
methods),
 * byteSize for abstract types ({{SegmentInfo}}, {{MergePolicy}}, ...). In that 
case, the {{byteSize}} may actually be a {{memSize}} or a {{diskSize}} 
depending on the directory implementation.

Or maybe we could still use {{diskSize}}, RAMDirectory being a special case. 
{{diskSize}} would even make sense for {{CachingRAMDirectory}} actually.
                
> Standardize ramBytesUsed/sizeInBytes/memSize
> --------------------------------------------
>
>                 Key: LUCENE-4121
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4121
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 4.0, 5.0
>
>         Attachments: LUCENE-4121.patch
>
>
> We should standardize the names of the methods we use to estimate the sizes 
> of objects in memory and on disk. (cf. discussion on dev@lucene 
> http://search-lucene.com/m/VbXSx1BP60G).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to