lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Confusing method names to get the size of objects
Date Fri, 08 Jun 2012 12:12:10 GMT
+1 to standardize on two names.  It is confusing now!

Mike McCandless

http://blog.mikemccandless.com

On Fri, Jun 8, 2012 at 6:20 AM, Adrien Grand <jpountz@gmail.com> wrote:
> Hi,
>
> Lucene and Solr have a few classes that expose the size of their
> instances, but with different method names. There are at least
> ramBytesUsed (packed ints), sizeInBytes (FST, RamDirectory) and
> memSize (Solr DocSets) that provide an estimation of the memory used
> in bytes. The confusing thing is that sizeInBytes is sometimes also
> used for on-disk sizes (SegmentInfo for example). I think it would
> improve readability to stick to only two method names, one for the
> in-memory size and one for the on-disk size. Or maybe these methods
> have different meanings that I am missing? What do you think?
>
> --
> Adrien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

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


Mime
View raw message