Blame SOURCES/eclipse-disable-droplets-in-dropins.patch

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