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

Benedict commented on CASSANDRA-9989:
-------------------------------------

So, when I suggested pre-computing, I meant pre-computing the split point (not 
still performing a separate split for the last two nodes, but having an if 
statement in the loop, that decrements the childSize by 1 on a selected node)

But, I'm happy to stop here - we can leave a TODO over the size calculation in 
the loop, to make revisiting easier should this method ever become a hotspot.

It's a huge improvement over the current state, so let's get it in before the 
freeze.  Thanks for bearing with all my review feedback!

> Optimise BTree.Buider
> ---------------------
>
>                 Key: CASSANDRA-9989
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9989
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Benedict
>            Assignee: Jay Zhuang
>            Priority: Minor
>             Fix For: 4.x
>
>         Attachments: 9989-trunk.txt
>
>
> BTree.Builder could reduce its copying, and exploit toArray more efficiently, 
> with some work. It's not very important right now because we don't make as 
> much use of its bulk-add methods as we otherwise might, however over time 
> this work will become more useful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to