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

Bug 342857

Summary: [region] Optimise region digraph for traversal
Product: [Eclipse Project] Equinox Reporter: Glyn Normington <glyn.normington>
Component: ComponentsAssignee: Glyn Normington <glyn.normington>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Remove OrderedPair none

Description Glyn Normington CLA 2011-04-14 11:28:18 EDT
Rather than representing the digraph edges as a map from pairs of regions to the corresponding edge:

    Region x Region +> RegionFilter

map each region to a set of edges:

    Region +> P (Region x Region Filter)

This is more efficient during traversal as the edges not involved in the traversal need not be enumerated.
Comment 1 Thomas Watson CLA 2011-04-18 13:37:52 EDT
Created attachment 193505 [details]
Remove OrderedPair

Glyn released a change to optimise digraph transversal.  The change removed the need for OrderedPair.  Some of the tests still used it.  This patch removes OrderedPair and modifies the tests to stop using it.

Glyn, please have a look at org.eclipse.virgo.kernel.osgi.region.internal.BundleIdBasedRegionTests.testAddBundle().  The patch removes a couple of lines that did not seem to do anything useful for the test.
Comment 2 Thomas Watson CLA 2011-04-18 15:43:55 EDT
I went ahead and released my patch to remove OrderedPair.  Closing this as fixed.
Comment 3 Glyn Normington CLA 2011-04-19 03:40:05 EDT
Thanks Tom. I noticed that OrderedPair was almost dead, but forgot to go back and kill it.