Bug 27076 - [Key Bindings] any reason why TreeMap was used in org.eclipse.ui.internal.actions.keybindings.Node?
Summary: [Key Bindings] any reason why TreeMap was used in org.eclipse.ui.internal.act...
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-11-25 06:40 EST by Adam Kiezun CLA
Modified: 2002-12-02 13:07 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-11-25 06:40:02 EST
bot sure if it's a bug
TreeMaps allocate a lot of garbage when used (iterators etc.) 
their only benefit over HashMaps is that they're always sorted.
i'm not sure but if that property is not necessary in toKeySequenceMap, then
a HashMap would be better there
Comment 1 Chris McLaren CLA 2002-12-02 13:07:06 EST
TreeMaps and TreeSets were intentionally chosen in the key bindings code for 
this sorting property. (HashMaps and HashSets are also used in the code where 
possible). I would like to keep this behavior unchanged. In light of this 
info, please let me know if you still think I should take a good look at 
getting rid of this. Ideally, I don't want to though. Thanks.