Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317098 - [context] Performance: move dependency information from Computation to Context
Summary: [context] Performance: move dependency information from Computation to Context
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: E4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-16 14:28 EDT by Oleg Besedin CLA
Modified: 2012-12-13 15:00 EST (History)
0 users

See Also:


Attachments
Patch 1 - cleanup before the change (18.23 KB, patch)
2010-06-16 14:30 EDT, Oleg Besedin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2010-06-16 14:28:57 EDT
Whenever a value changes in the EclipseContext, it notifies all listeners of the change. 

The listeners then can check the name of the update value and decide if they need to recompute their values. 

This does not scale all that well and results in ~300K calls to Computation.handleInvalid() on simple switch between two editors. Each call is quick, but still has to do lookups in HashMap / HashSet. That time adds up, resulting in roughly 25% of the time used to switch between editors.

I'd like to change the way we store dependency information for context values: store it in the contexts organized by names so that only affected Computation elements get called.
Comment 1 Oleg Besedin CLA 2010-06-16 14:30:24 EDT
Created attachment 172064 [details]
Patch 1 - cleanup before the change

This patch cleans up and re-organizes Computation code so that it is easier to read.