lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: StoredField
Date Mon, 18 Mar 2013 08:40:21 GMT
On Sun, Mar 17, 2013 at 5:56 PM, eksdev <eksdev@googlemail.com> 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
lucene.expert 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.

-- 
Adrien

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


Mime
View raw message