You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict Elliott Smith (Jira)" <ji...@apache.org> on 2019/11/05 17:17:00 UTC
[jira] [Commented] (CASSANDRA-15390) Avoid unnecessary
collection/iterator allocations during btree construction
[ https://issues.apache.org/jira/browse/CASSANDRA-15390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967687#comment-16967687 ]
Benedict Elliott Smith commented on CASSANDRA-15390:
----------------------------------------------------
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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org