[
https://issues.apache.org/jira/browse/CASSANDRA-12870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931399#comment-15931399
]
Edward Capriolo commented on CASSANDRA-12870:
---------------------------------------------
Quick note:
{quote}
LinkedList<String> keyspaces = new
LinkedList<>(Schema.instance.getNonLocalStrategyKeyspaces());
int kssize = keyspaces.size();
{quote}
* If performance is the issue, why copy the list? Are you worried about the
size changing during the method?
* If you are going to copy the list, why use a linked list? Generally ArrayList
is faster from local memory effects and you do not have to worry if the size()
function navigates the llist.
* Even if you stick with a LinkedList, best practice is the left side should be
List<String> right?
> Calculate pending ranges for identical KS settings just once
> ------------------------------------------------------------
>
> Key: CASSANDRA-12870
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12870
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Stefan Podkowinski
> Assignee: Stefan Podkowinski
> Fix For: 4.0
>
> Attachments: 12870-trunk.patch
>
>
> The {{TokenMetadata.calculatePendingRanges()}} operation can be very
> expensive and already has been subject to micro optimization in
> CASSANDRA-9258. Instead of further optimizing the calculation itself, I'd
> like to prevent it from being executed as often by only calling it just once
> for all keyspaces sharing identical replication settings.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)