Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323489 - [KeyBindings] Reduce memory footprint of BindingManager
Summary: [KeyBindings] Reduce memory footprint of BindingManager
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 284269
Blocks:
  Show dependency tree
 
Reported: 2010-08-24 09:56 EDT by Paul Webster CLA
Modified: 2010-12-07 14:10 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-08-24 09:56:27 EDT
+++ This bug was initially created as a clone of Bug #284269 +++

Build ID: 3.4.2.M20090107-0800

Steps To Reproduce:
Currently BindingManager is retaining 1.1MB of Java heap - I dug into why and one of the things I ran across was that we keep in memory KeyBindings for all platforms. I see there is code to modify the platform at runtime, and I assume this will rebind keys to the new platform, but in the case where the platform never changes at runtime isn't this a waste?

Out of the box I see a total of 630 bindings:
carbon: 119
gtk: 72
motif:14
win32: 58
null: 367

I modified BindingManager.setBindings() to filter out all non-null bindings that weren't for the current platform, which should never change on our RCP application.

I reran the change through our DayInTheLife automation and I see a significant improvement, from 1,114,195 bytes to 298,197 bytes.

I don't imagine this is a change that Eclipse could or would want, but for RCP apps that aren't going to change their platform at runtime does this seem reasonable?

More information:
Comment 1 Paul Webster CLA 2010-11-09 10:56:33 EST
attachment #177310 [details]

Released to HEAD
PW
Comment 2 Paul Webster CLA 2010-12-07 14:10:42 EST
In I20101206-1800
PW