[ 
https://issues.apache.org/jira/browse/IGNITE-27088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112186#comment-18112186
 ] 

Ignite TC Bot commented on IGNITE-27088:
----------------------------------------

{panel:title=Branch: [pull/13529/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/13529/head] Base: [master] : New Tests 
(4)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Binary Objects{color} [[tests 
4|https://ci2.ignite.apache.org/viewLog.html?buildId=9325469]]
* {color:#013220}IgniteBinaryObjectsTestSuite: StringWriterSelfTest.testCorpus 
- PASSED{color}
* {color:#013220}IgniteBinaryObjectsTestSuite: 
StringWriterSelfTest.testLargeStrings - PASSED{color}
* {color:#013220}IgniteBinaryObjectsTestSuite: 
StringWriterSelfTest.testRandomStrings - PASSED{color}
* {color:#013220}IgniteBinaryObjectsTestSuite: 
StringWriterSelfTest.testStreamPosition - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=9325610&buildTypeId=IgniteTests24Java8_RunAll]
{color:#ffffff}tcbot-analysis-comment chainBuildId=9325610 
rerunBuildIds=9330506{color}

> 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
>         Attachments: WritingBigMapReproducer.java
>
>          Time Spent: 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