Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-773

Use Map.entrySet and Map.values instead of multiple lookups from Map.keySet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.6
    • None

    Description

      in a few places in the codebase there are loops on Map containers in which the values are read but the iteration is done on the keys with subsequent calls to map.get(key).

      Using entrySet/values instead of keySet should bear a little performance improvement in that kind of loops (10/30%, if I recall correctly) but mostly the patch just gets rid of a few more FindBugs warnings. All tests still passing

      Attachments

        1. CASSANDRA-773-nows.patch
          8 kB
          gabriele renzi
        2. CASSANDRA-773.patch
          12 kB
          gabriele renzi

        Activity

          People

            riffraff gabriele renzi
            riffraff gabriele renzi
            gabriele renzi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified