lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <>
Subject Re: StoredField
Date Mon, 18 Mar 2013 08:40:21 GMT
On Sun, Mar 17, 2013 at 5:56 PM, eksdev <> wrote:
> Hi Adrian,

Hi eksdev,

> I cannot tell if such thing would make it less or more robust, just thinking aloud  :)
> I am thinking of it as a way to somehow postpone byte->type conversion to the moment
where it is really needed.  Simply, keep byte[] around as long as possible.
> *Theoretically*, this should improve gc() and memory footprint for some types of downstream
processing. It all depends how easy would something like that be.
> There is already a way to achieve this by using binary field type, …  hmmm, maybe some hack to make Lucene think every field is binary wold be simple and robust enough?
> e.g. Visitor.transportOnlySerializedValuesWithoutTypeConversion()

Sorry, but I think it would do more harm than good:
 - Stored fields encoding is an implementation detail so someone could
write a StoredFieldsFormat that serializes strings in UTF-16 to avoid
decoding overhead at read time, how
would.transportOnlySerializedValuesWithoutTypeConversion know the
actual encoding used by the underlying StoredFieldsFormat?
 - It would make users think that this kind of optimization is
valuable performance-wise while I think it's unnoticeable.


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

View raw message