ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-13) String marshalling can be optimized for binary marshaller
Date Tue, 14 Feb 2017 21:51:41 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Valentin Kulichenko updated IGNITE-13:
--------------------------------------
    Description: 
Currently string serialization is done in two steps (see {{BinaryWriterExImpl#doWriteString}}):

{code}
strArr = BinaryUtils.strToUtf8Bytes(val); // Encode string into byte array.
out.writeByteArray(strArr);                      // Write byte array into stream.
{code}

Probably we can write directly into stream while string is encoded, without intermediate array.
This both reduces memory consumption and eliminates array copy step.

Need to create a micro benchmark first to check if it gives any improvement.

  was:Instead of existing logic in readUtf/writeUtf in GridOptimizedMarshaller try to implement
more optimal marshaling when chars are encoded directly to byte array and unmarshaling when
chars are decoded to prepared char array.


> String marshalling can be optimized for binary marshaller
> ---------------------------------------------------------
>
>                 Key: IGNITE-13
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>            Reporter: Yakov Zhdanov
>            Assignee: Valentin Kulichenko
>
> Currently string serialization is done in two steps (see {{BinaryWriterExImpl#doWriteString}}):
> {code}
> strArr = BinaryUtils.strToUtf8Bytes(val); // Encode string into byte array.
> out.writeByteArray(strArr);                      // Write byte array into stream.
> {code}
> Probably we can write directly into stream while string is encoded, without intermediate
array. This both reduces memory consumption and eliminates array copy step.
> Need to create a micro benchmark first to check if it gives any improvement.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message