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