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

Benedict Elliott Smith edited comment on CASSANDRA-15390 at 11/5/19 5:16 PM:
-----------------------------------------------------------------------------

I like the pattern.  It might be worth putting in some explanatory comments, 
about why these functions exist?

I'm not thrilled by the name "Getter" since that usually means a member 
function that returns a value, but I don't have a much better suggestion.  
Perhaps {{IterateFunction}}?  Could also drop "get" as a prefix of the method 
name.

I wonder if there is any value in introducing a bulk {{nextAt}} method that can 
fetch into an array, for the leaf building mode.  We could fetch them all via 
{{arrayCopy}}, then loop over the array to invoke the {{UpdateFunction}} 
(conditionally on it not being no-op, even, since we seem to test this anyway 
already).


was (Author: benedict):
I like the pattern.  It might be worth putting in some explanatory comments, 
about why these functions exist?

I'm not thrilled by the name "Getter" since that usually means a member 
function that returns a value, but I don't have a much better suggestion.  
Perhaps {{IterateFunction}}?  Could also drop "get" as a prefix of the method 
name.

I wonder if there is any value in introducing a bulk {{nextAt}} method that can 
fetch into an array, for the leaf building mode.  We could fetch them all via 
arrayCopy, then loop over the array to invoke the {{UpdateFunction}} 
(conditionally on it not being no-op, even, since we seem to test this anyway 
already).

> Avoid unnecessary collection/iterator allocations during btree construction
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15390
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15390
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Local/Compaction
>            Reporter: Blake Eggleston
>            Assignee: Blake Eggleston
>            Priority: Normal
>             Fix For: 4.0
>
>
> A heavily used btree builder path does a lot of unnecessary conversions to 
> and from collections and iterators. Adding dedicated support for Object[] 
> reduces compaction garbage by up to 8.3%



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

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

Reply via email to