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

Ignite TC Bot updated IGNITE-27088:
-----------------------------------
    Release Note: Binary serialization: Added the 
IGNITE_BINARY_STRING_ZERO_COPY property, enabled by default, to reduce 
temporary heap allocations for String values.

> BinaryWriter should use internal String#value 
> ----------------------------------------------
>
>                 Key: IGNITE-27088
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27088
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Maksim Timonin
>            Assignee: Nikolay Izhikov
>            Priority: Major
>              Labels: ise
>             Fix For: 2.19
>
>         Attachments: WritingBigMapReproducer.java
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> While writing Strings in BinaryWriter we call BinaryWriterExImpl#writeString, 
> that calls String#getBytes. 
> Last call creates a copy of internal String#value byte array. Java does it 
> intentionally, to avoid scenario when this array will be changed. 
> But writing a lot of strings leads to useless heap usage for creating such 
> copies. Actually we can get this array using Unsafe/Reflection to optimize 
> String writings.
> This change should be done carefully, because String.getBytes also provides 
> encoding, and this behavior must be taken into account.
> Example of writeString/writeByteArray in attach



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to