You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (Jira)" <ji...@apache.org> on 2019/11/12 16:42:00 UTC

[jira] [Updated] (CASSANDRA-15410) Avoid over-allocation of bytes for UTF8 string serialization

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

Aleksey Yeschenko updated CASSANDRA-15410:
------------------------------------------
    Change Category: Performance
         Complexity: Low Hanging Fruit
      Fix Version/s: 4.0
          Reviewers: Aleksey Yeschenko
             Status: Open  (was: Triage Needed)

> Avoid over-allocation of bytes for UTF8 string serialization 
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-15410
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15410
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Messaging/Client
>            Reporter: Yifan Cai
>            Assignee: Abhishek Singh
>            Priority: Normal
>             Fix For: 4.0
>
>
> In the current message encoding implementation, it first calculates the `encodeSize` and allocates the bytebuffer with that size. 
> However, during encoding, it assumes the worst case of writing UTF8 string to allocate bytes, i.e. assuming each letter takes 3 bytes. 
> The over-estimation further leads to resizing the underlying array and data copy. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org