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

Stefania commented on CASSANDRA-12013:
--------------------------------------

+1

In 3.0+ we already call {{isEOF()}} only when rebuffering, we can do the same 
in 2.2 since it is a safe thing to do and it is redundant work on the critical 
path.

I've launched a round of CI tests:

|[patch|https://github.com/stef1927/cassandra/commits/12013-2.2]|[testall|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12013-2.2-testall/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12013-2.2-dtest/]|

If the results are good we can commit to 2.2 and up-merge with {{-s ours}}.

> Optimize the isEOF() checking in RAR
> ------------------------------------
>
>                 Key: CASSANDRA-12013
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12013
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Dikang Gu
>            Assignee: Dikang Gu
>            Priority: Minor
>              Labels: compaction
>             Fix For: 2.2.x
>
>         Attachments: 0001-Optimize-the-isEOF-checking-in-RAR.patch, 
> Screenshot 2016-06-15 11.20.51.png
>
>
> When I profile compaction in 2.1, I find the isEOF() is an expensive 
> operation, and we do the check for each read in RAR, which I think is 
> unnecessary.
> I attach a patch to only check isEOF() when we need to rebuffer, and then I 
> do not see it from hotspot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to