You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2018/10/25 07:54:00 UTC
[jira] [Created] (SOLR-12924) Optimize JavabinCodec to use byte[]
backed CHarSequence instead of String
Noble Paul created SOLR-12924:
---------------------------------
Summary: Optimize JavabinCodec to use byte[] backed CHarSequence instead of String
Key: SOLR-12924
URL: https://issues.apache.org/jira/browse/SOLR-12924
Project: Solr
Issue Type: Improvement
Security Level: Public (Default Security Level. Issues are Public)
Reporter: Noble Paul
javabin format uses {{UTF8}} format for String serialization and java Strings are {{UTF16}} and java String always days a buffer copy of those {{UTF16}} input.
So, what I propose is
* we create a byte[] backed {{CharSequence}} implementation.
* Optionally, javabinCodec can should be able to return this CharSequence instead of all Strings
* If a {{charAt()}} or {{toString()}} call is made to this {{CharSequence}} we create a String and cache it
* When this {{CharSequence needs to be serialized again in javabin format it should copy the underlying utf8 byte[]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org