forked from I2P_Developers/i2p.i2p
Router, naming, I2CP: Increase lookup cache max sizes (except on Android),
reduce max lookup depth, and increase non-floodfill profile bonus to attempt to reduce load on floodfills
This commit is contained in:
@@ -170,11 +170,12 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
private volatile boolean _routerSupportsFastReceive;
|
||||
private volatile boolean _routerSupportsHostLookup;
|
||||
|
||||
protected static final int CACHE_MAX_SIZE = SystemVersion.isAndroid() ? 32 : 128;
|
||||
/**
|
||||
* Since 0.9.11, key is either a Hash or a String
|
||||
* @since 0.8.9
|
||||
*/
|
||||
private static final Map<Object, Destination> _lookupCache = new LHMCache<Object, Destination>(64);
|
||||
private static final Map<Object, Destination> _lookupCache = new LHMCache<Object, Destination>(CACHE_MAX_SIZE);
|
||||
private static final String MIN_HOST_LOOKUP_VERSION = "0.9.11";
|
||||
private static final boolean TEST_LOOKUP = false;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.util.LHMCache;
|
||||
import net.i2p.util.SystemVersion;
|
||||
|
||||
/**
|
||||
* A Dummy naming service that can only handle base64 and b32 destinations.
|
||||
@@ -23,7 +24,7 @@ class DummyNamingService extends NamingService {
|
||||
|
||||
protected static final int BASE32_HASH_LENGTH = 52; // 1 + Hash.HASH_LENGTH * 8 / 5
|
||||
public final static String PROP_B32 = "i2p.naming.hostsTxt.useB32";
|
||||
protected static final int CACHE_MAX_SIZE = 32;
|
||||
protected static final int CACHE_MAX_SIZE = SystemVersion.isAndroid() ? 32 : 128;
|
||||
public static final int DEST_SIZE = 516; // Std. Base64 length (no certificate)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user