Bug 107879 - MSLEventBroker could dispatch filtered notifications more efficiently
Summary: MSLEventBroker could dispatch filtered notifications more efficiently
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: All Windows XP
: P2 normal
Target Milestone: ---   Edit
Assignee: Vishy Ramaswamy CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, performance
Depends on: 113708
Blocks:
  Show dependency tree
 
Reported: 2005-08-24 11:45 EDT by Chris McGee CLA
Modified: 2010-07-19 12:24 EDT (History)
1 user (show)

See Also:


Attachments
A patch to the org.eclipse.gmf.runtime.emf.core.compatibility plugin. (6.13 KB, patch)
2006-02-21 09:48 EST, Chris McGee CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris McGee CLA 2005-08-24 11:45:05 EDT
The MSLEventBroker currently generates a custom list of notifications for each
MListener individually. In many cases, MListeners are using some of our
predefined MFilters. Many of our most commonly used MFilters are singleton and
stateless. Therefore, once a list of notifications is filtered, that list will
remain the same for all other listeners using an equivalent filter.
Comment 1 Chris McGee CLA 2006-02-20 15:27:13 EST
After looking at many typical MListeners I discovered that most are using either MFilter.WILDCARD_FILTER or some tree of MFilters ANDed/ORed together. The MFilter.WILDCARD_FILTER case is already optimal in the event broker class. Also, because MFilter is public API and anyone can subclass it for their listener, there is no guarantee that even an identical MFilter will give the same response even with the same Notification. Attempting to normalize an AND/ORed tree of MFilters is a complex problem with significant performance impact.

A simpler solution that can actually solve some performance issues in the short term would be to reuse one list object for all listeners. This will save significant time in the garbage collector if there are alot of listeners.
Comment 2 Chris McGee CLA 2006-02-20 20:55:26 EST
Some testing shows that reuse of the list can save up to 15% of the time to perform an action and propagate the event to a large number of listeners.
Comment 3 Chris McGee CLA 2006-02-21 09:48:53 EST
Created attachment 35072 [details]
A patch to the org.eclipse.gmf.runtime.emf.core.compatibility plugin.
Comment 4 Vishy Ramaswamy CLA 2006-02-21 20:01:07 EST
Reviewed and applied patch
Comment 5 Eclipse Webmaster CLA 2010-07-19 12:24:34 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug