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] [Comment Edited] (CASSANDRA-5019) Still too much object allocation on reads
Date Fri, 21 Dec 2012 00:47:12 GMT

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

Jonathan Ellis edited comment on CASSANDRA-5019 at 12/21/12 12:45 AM:
----------------------------------------------------------------------

A Flyweight pattern is one approach.  Something like

{code}
class FlyweightColumns
{
  ByteBuffer[] names;
  ByteBuffer[] values;
  long[] timestamps;

  private class FlyweightColumn implements IColumn
  {
    private final int index;

    public ByteBuffer name()
    {
      return names[index];
    }

    ... 
  }
}
{code}
                
      was (Author: jbellis):
    A Flyweight pattern is one approach.  Something like

{code}
class FlyweightColumns
{
  ByteBuffer[] names;
  ByteBuffer[] values;
  long[] timestamps;

  private class FlyweightColumn implements IColumn
  {
    private final int index;

    public ByteBuffer name()
    {
      return names[index];
    }

    ... 
  }
}
                  
> Still too much object allocation on reads
> -----------------------------------------
>
>                 Key: CASSANDRA-5019
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5019
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>             Fix For: 2.0
>
>
> ArrayBackedSortedColumns was a step in the right direction but it's still relatively
heavyweight thanks to allocating individual Columns.

--
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