From a3a092a4543359fe4c35f2cdd4c266afa3d2ad84 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sun, 1 Nov 2015 19:31:22 +0000
Subject: [PATCH] Utils: Double IP lookup cache size (ticket #1700)

---
 core/java/src/net/i2p/util/Addresses.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/java/src/net/i2p/util/Addresses.java b/core/java/src/net/i2p/util/Addresses.java
index b33839b483..e4a78cc37d 100644
--- a/core/java/src/net/i2p/util/Addresses.java
+++ b/core/java/src/net/i2p/util/Addresses.java
@@ -231,10 +231,10 @@ public abstract class Addresses {
         I2PAppContext ctx = I2PAppContext.getCurrentContext();
         if (ctx != null && ctx.isRouterContext()) {
             long maxMemory = SystemVersion.getMaxMemory();
-            long min = 128;
+            long min = 256;
             long max = 4096;
-            // 512 nominal for 128 MB
-            size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (256*1024))));
+            // 1024 nominal for 128 MB
+            size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (128*1024))));
         } else {
             size = 32;
         }
-- 
GitLab