Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-07-27 14:14:11 -0400
committerDJ Houghton2010-07-27 14:14:11 -0400
commit9248360137b450399dc0d25a79c86fddd7dd1708 (patch)
tree8a0ee31c2e6fbf15f09342dca3fc5d5f0a004c27 /bundles/org.eclipse.equinox.p2.directorywatcher
parentc17176b83744fdf18ab9f89326fcb7482de112b5 (diff)
downloadrt.equinox.p2-9248360137b450399dc0d25a79c86fddd7dd1708.tar.gz
rt.equinox.p2-9248360137b450399dc0d25a79c86fddd7dd1708.tar.xz
rt.equinox.p2-9248360137b450399dc0d25a79c86fddd7dd1708.zip
Bug 321057 - [performance] [reconciler] [query] Super slow startup time after deleting files in dropins
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher')
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
index 36bfd20b4..574a85657 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
@@ -37,18 +37,22 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
}
public void save() {
- savePropertyChanges();
- saveAdditions();
- saveRemovals();
+ innerRepo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ savePropertyChanges();
+ saveAdditions();
+ saveRemovals();
+ }
+ }, null);
}
- private void saveRemovals() {
+ void saveRemovals() {
for (IArtifactDescriptor desc : descriptorsToRemove)
innerRepo.removeDescriptor(desc);
descriptorsToRemove.clear();
}
- private void saveAdditions() {
+ void saveAdditions() {
if (descriptorsToAdd.isEmpty())
return;
innerRepo.addDescriptors(descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]));
@@ -56,7 +60,7 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
artifactMap.clear();
}
- private void savePropertyChanges() {
+ void savePropertyChanges() {
for (String key : propertyChanges.keySet()) {
String value = propertyChanges.get(key);
innerRepo.setProperty(key, value == NULL ? null : value);

Back to the top