Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 88173 Details for
Bug 216934
[plan] Performance issues with the Export-Package "uses" directive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
216934_org.eclipse.osgi.txt (text/plain), 3.16 KB, created by
Thomas Watson
on 2008-01-29 14:01:07 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Thomas Watson
Created:
2008-01-29 14:01:07 EST
Size:
3.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.osgi >Index: resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java,v >retrieving revision 1.74 >diff -u -r1.74 ResolverImpl.java >--- resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java 26 Oct 2007 16:06:09 -0000 1.74 >+++ resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java 29 Jan 2008 18:45:08 -0000 >@@ -37,7 +37,8 @@ > public static boolean DEBUG_GROUPING = false; > public static boolean DEBUG_CYCLES = false; > private static int MAX_MULTIPLE_SUPPLIERS_MERGE = 10; >- private static long MAX_COMBINATIONS = 1000000; >+ private static int MAX_USES_TIME_BASE = 30000; // 30 seconds >+ private static int MAX_USES_TIME_LIMIT = 90000; // 90 seconds > > private static String[][] CURRENT_EES; > >@@ -585,7 +586,7 @@ > } > ResolverConstraint[][] multipleSuppliers = getMultipleSuppliers(bundles, packageConstraints, bundleConstraints); > ArrayList conflicts = null; >- if (multipleSuppliers.length > 0 && getNumCombinations(multipleSuppliers) < MAX_COMBINATIONS) { >+ if (multipleSuppliers.length > 0) { > int[] bestCombination = new int[multipleSuppliers.length]; > conflicts = findBestCombination(bundles, multipleSuppliers, bestCombination, initialConflicts); > for (int i = 0; i < bestCombination.length; i++) { >@@ -601,16 +602,6 @@ > return conflicts; > } > >- private long getNumCombinations(ResolverConstraint[][] multipleSuppliers) { >- if (multipleSuppliers == null || multipleSuppliers.length == 0) >- return 0; >- long numCombinations = multipleSuppliers[0][0].getNumPossibleSuppliers(); >- for (int i = 1; i < multipleSuppliers.length; i++) >- if (multipleSuppliers[i].length > 0) >- numCombinations *= multipleSuppliers[i][0].getNumPossibleSuppliers(); >- return numCombinations; >- } >- > private int[] getCombination(ResolverConstraint[][] multipleSuppliers, int[] combination) { > for (int i = 0; i < combination.length; i++) > combination[i] = multipleSuppliers[i][0].getSelectedSupplierIndex(); >@@ -621,9 +612,13 @@ > // now iterate over every possible combination until either zero conflicts are found > // or we have run out of combinations > // if all combinations are tried then return the combination with the lowest number of conflicts >+ long initialTime = System.currentTimeMillis(); >+ long timeLimit = MAX_USES_TIME_BASE + (bundles.length * 30); >+ if (timeLimit > MAX_USES_TIME_LIMIT) >+ timeLimit = MAX_USES_TIME_LIMIT; > int bestConflictCount = getConflictCount(bestConflicts); > ResolverBundle[] bestConflictBundles = getConflictedBundles(bestConflicts); >- while (bestConflictCount != 0 && getNextCombination(multipleSuppliers)) { >+ while (bestConflictCount != 0 && (System.currentTimeMillis() - initialTime) < timeLimit && getNextCombination(multipleSuppliers)) { > if (DEBUG_GROUPING) > printCombination(getCombination(multipleSuppliers, new int[multipleSuppliers.length])); > // first count the conflicts for the bundles with conflicts from the best combination
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 216934
: 88173 |
128528