cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stu Hood (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-611) Fix Findbugs: Replace keySet w entrySet
Date Wed, 09 Dec 2009 18:28:18 GMT


Stu Hood commented on CASSANDRA-611:

I just noticed that this report missed the most critical of all our abuses of keySet(): calling
ColumnFamily.getSortedValues(), and then calling getColumn(name) on another CF. For two sorted
lists, we should iterate in parallel.

> Fix Findbugs: Replace keySet w entrySet
> ---------------------------------------
>                 Key: CASSANDRA-611
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Stu Hood
>         Attachments: findbugs-keyset-w-entryset.txt
> A lot of places in the codebase, we iterate over the  keySet() of a Map, and call get()
for each key. For a HashMap, this is still O(N), but when you are dealing with a SortedMap,
this is O(NlogN). The list of occurences are attached.
> Fixing this issue should give us a general (minor?) performance boost.
> In order to find unused method parameters for CASSANDRA-608, I ran FindBugs against Cassandra,
and found a few interesting issues we ought to explore (but not the unused method params,

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message