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

Bug 362199

Summary: nodeChangeListeners list in PreferenceStoreAccessImpl keeps growing in size
Product: [Modeling] TMF Reporter: Hendrik Eeckhaut <hendrik>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sebastian.zarnekow: juno+
Target Milestone: M5   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
proposed patch none

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