cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5019) Still too much object allocation on reads
Date Thu, 20 Dec 2012 11:35:13 GMT

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

Sylvain Lebresne commented on CASSANDRA-5019:
---------------------------------------------

Actually, thinking about this issue a bit more, I'm wondering: what is it we expect to win
here?

Because we will still need to allocate one FlyweightColumn object per actual column. So in
terms of sheer number of allocated objects, we'll have the same number (in fact we'll even
have marginally more ojbects since we'll have to allocate the FlyweightColumns names, values
and timestamps arrays).

Now it's true that the memory layout will be slightly different, with the FlyweightColumn
objects being slightly smaller than their Column counterpart (though overall we won't allocate
less memory), but I'm not sure it makes much difference for the GC since the size difference
is relatively minor.  And on the other side, the circular dependency of FlyweightColumns to
it's child FlyweightColumn might make the job of the GC a bit harder (it's more links to explore).
Overall, it's far from obvious to me that it would improve things in a measurable way.

And doing that would also mess a bit with the ColumnSerializer, as we would want it to create
a flyweightColumn right away, meaning that it's not just an alternative ISortedColumn implementation,
the abstraction would leak out.

So am I missing something here and not understanding that idea at all?

                
> 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