lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Confusing method names to get the size of objects
Date Fri, 08 Jun 2012 10:20:32 GMT
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


Mime
View raw message