Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317394 - Method org.eclipse.cdt.codan.core.param.MapProblemPreference.setValue(Object) makes inefficient use of keySet iterator instead of entrySet iterator
Summary: Method org.eclipse.cdt.codan.core.param.MapProblemPreference.setValue(Object)...
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-20 23:34 EDT by Meisam CLA
Modified: 2011-01-17 22:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Meisam CLA 2010-06-20 23:34:12 EDT
This is a performance issue reported by Findbugs.

Instead of iterating over the keyset of a map and calling map.get(key), it's more efficient to iterate over the entryset.

BTW, as long as the number of objects stored in the map is not big, this is not a big deal.
Comment 1 Elena Laskavaia CLA 2011-01-17 22:44:57 EST
It is a questionable practice trying to optimize code which is not a bottleneck or require performance improvement, 
->no intend to fix