You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2016/12/29 10:28:02 UTC

svn commit: r1776396 - /felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/InvocationUtil.java

Author: pderop
Date: Thu Dec 29 10:28:02 2016
New Revision: 1776396

URL: http://svn.apache.org/viewvc?rev=1776396&view=rev
Log:
FELIX-5469: Methodcache system size property is not used. this a a regression starting from dm4 r1. before the default value was 2048, now it is set to 4096 by default.

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/InvocationUtil.java

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/InvocationUtil.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/InvocationUtil.java?rev=1776396&r1=1776395&r2=1776396&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/InvocationUtil.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/InvocationUtil.java Thu Dec 29 10:28:02 2016
@@ -30,6 +30,7 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.felix.dm.DependencyManager;
 import org.osgi.service.cm.ConfigurationException;
 
 /**
@@ -40,15 +41,14 @@ import org.osgi.service.cm.Configuration
 public class InvocationUtil {
     private static final Map<Key, Method> m_methodCache;
     static {
-        int size = 2048;
-        // TODO enable this again
-//        try {
-//            String value = System.getProperty(DependencyManager.METHOD_CACHE_SIZE);
-//            if (value != null) {
-//                size = Integer.parseInt(value);
-//            }
-//        }
-//        catch (Exception e) {}
+        int size = 4096;
+        try {
+            String value = System.getProperty(DependencyManager.METHOD_CACHE_SIZE);
+            if (value != null) {
+                size = Integer.parseInt(value);
+            }
+        }
+        catch (Exception e) {}
         m_methodCache = new LRUMap(Math.max(size, 64));
     }