diff options
author | Thomas Watson | 2018-02-09 19:10:12 +0000 |
---|---|---|
committer | Thomas Watson | 2018-02-10 16:08:11 +0000 |
commit | e93c3769d080db13b1de2f5b095ffcc71b2debac (patch) | |
tree | 461c43c777de0465f9a2d051d22e23e19044bd02 | |
parent | 25d4df4a8e8067262e9b0d7449b74a9b615a62ca (diff) | |
download | rt.equinox.framework-Y20180329-1000.tar.gz rt.equinox.framework-Y20180329-1000.tar.xz rt.equinox.framework-Y20180329-1000.zip |
Bug 530967 - Delay in MRUBundleFileList causes performance issuesY20180329-1000Y20180315-1000Y20180308-1000Y20180301-1000Y20180222-1000Y20180215-1000S4_7_3_aRC2S4_7_3_aRC1S4_7_3_RC4S4_7_3_RC3S4_7_3_RC2R4_7_3_aR4_7_3M20180404-0400M20180330-0640M20180329-1005M20180328-2205M20180328-1700M20180328-0400M20180327-0400M20180326-0400M20180325-0400M20180323-1030M20180322-1835M20180322-1700M20180322-1030M20180322-0935M20180322-0400M20180316-0240M20180315-0710M20180307-0400M20180301-0715M20180301-0330M20180221-1700M20180221-0535M20180215-0545M20180214-1700M20180214-0500M20180213-0600
Change-Id: Ia827a94db8111aa8b3a87c56041080da21564845
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
3 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF index ccd1e01e3..c480b60cc 100644 --- a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF @@ -103,7 +103,7 @@ Bundle-Activator: org.eclipse.osgi.internal.framework.SystemBundleActivator Bundle-Description: %systemBundle Bundle-Copyright: %copyright Bundle-Vendor: %eclipse.org -Bundle-Version: 3.12.50.qualifier +Bundle-Version: 3.12.100.qualifier Bundle-Localization: systembundle Bundle-DocUrl: http://www.eclipse.org Eclipse-ExtensibleAPI: true diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java index e105c0d75..71ce0c317 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2017 IBM Corporation and others. + * Copyright (c) 2005, 2018 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,6 +33,7 @@ public class MRUBundleFileList implements EventDispatcher<Object, Object, Bundle final private long[] useStampList; // the limit of open files to allow before least used bundle file is closed final private int fileLimit; // value < MIN will disable MRU + final private int delayLimit; private EventManager bundleFileCloserManager = null; final private Map<Object, Object> bundleFileCloser; // the current number of open bundle files @@ -47,6 +48,9 @@ public class MRUBundleFileList implements EventDispatcher<Object, Object, Bundle public MRUBundleFileList(int fileLimit) { // only enable the MRU if the initFileLimit is > MIN this.fileLimit = fileLimit; + // If the filelimit is > 5000 then use it as the delayLimit also; + // Otherwise use the max between fileLimit * 2 and 500 + this.delayLimit = Math.max(fileLimit > 5000 ? fileLimit : fileLimit * 2, 500); if (fileLimit >= MIN) { this.bundleFileList = new BundleFile[fileLimit]; this.useStampList = new long[fileLimit]; @@ -184,7 +188,7 @@ public class MRUBundleFileList implements EventDispatcher<Object, Object, Bundle if (toRemove == null) return; int pendingNum = pending.incrementAndGet(); - if (pendingNum > fileLimit) { + if (pendingNum > delayLimit) { // delay to allow the closer to catchup try { Thread.sleep(Math.min(500, pendingNum)); diff --git a/bundles/org.eclipse.osgi/pom.xml b/bundles/org.eclipse.osgi/pom.xml index 723f0ac31..81dd20db6 100644 --- a/bundles/org.eclipse.osgi/pom.xml +++ b/bundles/org.eclipse.osgi/pom.xml @@ -19,7 +19,7 @@ </parent> <groupId>org.eclipse.osgi</groupId> <artifactId>org.eclipse.osgi</artifactId> - <version>3.12.50-SNAPSHOT</version> + <version>3.12.100-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> <build> |