|
|
d433ea |
From edd5a395dd96699f91c463c0e0409a7488814775 Mon Sep 17 00:00:00 2001
|
|
|
d433ea |
From: Roland Grunberg <rgrunber@redhat.com>
|
|
|
d433ea |
Date: Tue, 16 Aug 2016 17:51:46 -0400
|
|
|
d433ea |
Subject: [PATCH] Skip loading droplets in the configuration during
|
|
|
d433ea |
reconciliation.
|
|
|
d433ea |
|
|
|
d433ea |
The reconciler attempts to load droplets as extended locations, which
|
|
|
d433ea |
seems to be an expensive operation. Avoid doing this for the sake of
|
|
|
d433ea |
efficiency.
|
|
|
d433ea |
|
|
|
d433ea |
Change-Id: Iaf07aacb2d7eaabf3730654e757e69d22f0bc4ab
|
|
|
d433ea |
---
|
|
|
d433ea |
.../internal/p2/reconciler/dropins/PlatformXmlListener.java | 13 +++++++++++++
|
|
|
d433ea |
1 file changed, 13 insertions(+)
|
|
|
d433ea |
|
|
|
d433ea |
diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
|
|
|
d433ea |
index 802ee1b..74023fe 100644
|
|
|
d433ea |
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
|
|
|
d433ea |
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
|
|
|
040604 |
@@ -172,11 +172,24 @@ public class PlatformXmlListener extends DirectoryChangeListener {
|
|
|
d433ea |
* Ensure that we have a repository for each site in the given configuration.
|
|
|
d433ea |
*/
|
|
|
d433ea |
protected void synchronizeConfiguration(Configuration config) {
|
|
|
d433ea |
+ String fragments = System.getProperty("p2.fragments");
|
|
|
d433ea |
List<Site> sites = config.getSites();
|
|
|
d433ea |
Set<IMetadataRepository> newRepos = new LinkedHashSet<>();
|
|
|
d433ea |
Set<Site> toBeRemoved = new HashSet<>();
|
|
|
d433ea |
for (Site site : sites) {
|
|
|
d433ea |
String siteURL = site.getUrl();
|
|
|
d433ea |
+ if (fragments != null) {
|
|
|
d433ea |
+ String[] rootPaths = fragments.split(",");
|
|
|
d433ea |
+ boolean skip = false;
|
|
|
d433ea |
+ for (String path : rootPaths) {
|
|
|
d433ea |
+ if (siteURL.startsWith("file:" + path)) {
|
|
|
d433ea |
+ skip = true;
|
|
|
d433ea |
+ }
|
|
|
d433ea |
+ }
|
|
|
d433ea |
+ if (skip) {
|
|
|
d433ea |
+ continue;
|
|
|
d433ea |
+ }
|
|
|
d433ea |
+ }
|
|
|
d433ea |
IMetadataRepository match = getMatchingRepo(Activator.getRepositories(), siteURL);
|
|
|
d433ea |
if (match == null) {
|
|
|
d433ea |
try {
|
|
|
d433ea |
--
|
|
|
d433ea |
2.7.4
|
|
|
d433ea |
|