cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11972) Use byte[] instead of object tree in Frame.Header
Date Tue, 07 Jun 2016 17:51:21 GMT


Sylvain Lebresne commented on CASSANDRA-11972:

I will note that while removing allocations is a worthy goal, this will only remove those
couple of allocations per-native-transport-message, which is not necessarily a big deal, and
this probably at the cost of some code clarity. Now, it's probable in this case that the code
clarity should suffer much, but I guess my point is that we should take the habit of trying
to demonstrate the benefits of that kind of patch, or it's really premature optimization.

> Use byte[] instead of object tree in Frame.Header
> -------------------------------------------------
>                 Key: CASSANDRA-11972
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 3.x
> Replacing the object tree/references in {{Frame.Header}} with {{byte[9]}} saves a couple
of object allocations. Also, not allocating the 9 bytes for the header off-heap is less expensive.
> (will provide a patch soon)

This message was sent by Atlassian JIRA

View raw message