Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362199 - nodeChangeListeners list in PreferenceStoreAccessImpl keeps growing in size
Summary: nodeChangeListeners list in PreferenceStoreAccessImpl keeps growing in size
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 10:06 EDT by Hendrik Eeckhaut CLA
Modified: 2017-09-19 18:00 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: juno+


Attachments
proposed patch (5.96 KB, patch)
2011-10-27 14:50 EDT, Michael Clay CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Eeckhaut CLA 2011-10-27 10:06:17 EDT
Build Identifier: 20110615-0604

Every time get(Writable)PreferenceStore in PreferenceStoreAccessImpl is called, a new ScopedPreferenceStore is constructed which adds a NodeChangeListener. These listeners are however never removed.
This results in an ever growing listener list and performance issues.

Reproducible: Always

Steps to Reproduce:
1. Open an Xtext editor
2. make an edit
3. this triggers the outline to check the isEnabled() preference
4. this gets a preferenceStore which add a new NodeChangeListener
Comment 1 Michael Clay CLA 2011-10-27 14:50:38 EDT
Created attachment 206090 [details]
proposed patch
Comment 2 Sebastian Zarnekow CLA 2012-01-18 08:14:25 EST
see also bug 239033
Comment 3 Sebastian Zarnekow CLA 2012-01-18 08:32:58 EST
Comment on attachment 206090 [details]
proposed patch

Decided to use a FixedScopePreferenceStore instead of the listener approach.
Comment 4 Sebastian Zarnekow CLA 2012-01-18 09:01:23 EST
Pushed to master.
Comment 5 Karsten Thoms CLA 2017-09-19 17:49:55 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 18:00:51 EDT
Closing all bugs that were set to RESOLVED before Neon.0