cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5541) Reduce Empty Map allocations in RowMutation (modifications)
Date Mon, 06 May 2013 19:52:15 GMT

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

Jonathan Ellis commented on CASSANDRA-5541:
-------------------------------------------

I'll also note that a Builder pattern instead of mutating the RMs directly would clean this
up nicely and allow using a more memory-efficient ImmutableMap for when we really do have
multiple entries.  (I converted a few hot spots to use the RowMutation constructor that creates
a SingletonMap as a baby step towards this a while back, but there's a ton of code that uses
the old {{add}} methods.)
                
> Reduce Empty Map allocations in RowMutation (modifications)
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-5541
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5541
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 2.0
>
>         Attachments: 5541.txt
>
>
> The constructor 
> public RowMutation(String table, ByteBuffer key)
> was generation tons of empty HashMaps that were unused, on the order of 160,000 of them
in about a minute.
> delay creating the map until you need it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message