Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317394

Summary: Method org.eclipse.cdt.codan.core.param.MapProblemPreference.setValue(Object) makes inefficient use of keySet iterator instead of entrySet iterator
Product: [Tools] CDT Reporter: Meisam <meisam.fathi>
Component: cdt-codanAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED WONTFIX QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

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