You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (Created) (JIRA)" <ji...@apache.org> on 2012/01/02 20:52:30 UTC

[jira] [Created] (CASSANDRA-3688) [patch] avoid map lookups in loops by using entrysets

[patch] avoid map lookups in loops by using entrysets
-----------------------------------------------------

                 Key: CASSANDRA-3688
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3688
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.0.6
            Reporter: Dave Brosius
            Priority: Trivial
             Fix For: 1.0.7
         Attachments: use_entrysets.diff

code loops over the keySet and does gets for the value, just use entrySet()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3688) [patch] avoid map lookups in loops by using entrysets

Posted by "Dave Brosius (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius updated CASSANDRA-3688:
------------------------------------

    Attachment: use_entrysets.diff
    
> [patch] avoid map lookups in loops by using entrysets
> -----------------------------------------------------
>
>                 Key: CASSANDRA-3688
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3688
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.0.7
>
>         Attachments: use_entrysets.diff
>
>
> code loops over the keySet and does gets for the value, just use entrySet()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CASSANDRA-3688) [patch] avoid map lookups in loops by using entrysets

Posted by "Jonathan Ellis (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-3688.
---------------------------------------

    Resolution: Fixed

committed to trunk
                
> [patch] avoid map lookups in loops by using entrysets
> -----------------------------------------------------
>
>                 Key: CASSANDRA-3688
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3688
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.1
>
>         Attachments: use_entrysets.diff
>
>
> code loops over the keySet and does gets for the value, just use entrySet()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3688) [patch] avoid map lookups in loops by using entrysets

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178751#comment-13178751 ] 

Sylvain Lebresne commented on CASSANDRA-3688:
---------------------------------------------

I have nothing against that per se, but it's really in non-performance sensitive code and so doesn't matter at all. And the replacement is slightly more verbose. Overall I don't really care one way or the other but it does look like change for the sake of change, which we probably should avoid.
                
> [patch] avoid map lookups in loops by using entrysets
> -----------------------------------------------------
>
>                 Key: CASSANDRA-3688
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3688
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.0.7
>
>         Attachments: use_entrysets.diff
>
>
> code loops over the keySet and does gets for the value, just use entrySet()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3688) [patch] avoid map lookups in loops by using entrysets

Posted by "Jonathan Ellis (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3688:
--------------------------------------

             Reviewer: jbellis
    Affects Version/s:     (was: 1.0.6)
        Fix Version/s:     (was: 1.0.8)
                       1.1
             Assignee: Dave Brosius
    
> [patch] avoid map lookups in loops by using entrysets
> -----------------------------------------------------
>
>                 Key: CASSANDRA-3688
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3688
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.1
>
>         Attachments: use_entrysets.diff
>
>
> code loops over the keySet and does gets for the value, just use entrySet()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3688) [patch] avoid map lookups in loops by using entrysets

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178795#comment-13178795 ] 

Jonathan Ellis commented on CASSANDRA-3688:
-------------------------------------------

To be fair, it's more "change for the sake of shutting up findbugs," which is good if it reduces the effort we have to do to investigate future reports.  This is the "right" way to loop over maps in Java so I'd be +1 for trunk.
                
> [patch] avoid map lookups in loops by using entrysets
> -----------------------------------------------------
>
>                 Key: CASSANDRA-3688
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3688
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.0.7
>
>         Attachments: use_entrysets.diff
>
>
> code loops over the keySet and does gets for the value, just use entrySet()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira