lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4121) Standardize ramBytesUsed/sizeInBytes/memSize
Date Wed, 13 Jun 2012 16:52:43 GMT


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:
>             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

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message