Changeset 9df0472


Ignore:
Timestamp:
May 13, 2009 5:38:30 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ccab73f
Parents:
94c2ba7
Message:

Reduce routerinfo expiration again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    r94c2ba7 r9df0472  
    628628        long now = _context.clock().now();
    629629        boolean upLongEnough = _context.router().getUptime() > 60*60*1000;
    630         // Once we're over 300 routers, reduce the expiration time down from the default,
     630        // Once we're over 150 routers, reduce the expiration time down from the default,
    631631        // as a crude way of limiting memory usage.
    632         // i.e. at 600 routers the expiration time will be about half the default, etc.
     632        // i.e. at 300 routers the expiration time will be about half the default, etc.
    633633        // And if we're floodfill, we can keep the expiration really short, since
    634634        // we are always getting the latest published to us.
     
    639639            adjustedExpiration = ROUTER_INFO_EXPIRATION_FLOODFILL;
    640640        else
     641            // _kb.size() includes leasesets but that's ok
    641642            adjustedExpiration = Math.min(ROUTER_INFO_EXPIRATION,
    642643                                          ROUTER_INFO_EXPIRATION_MIN +
    643                                           ((ROUTER_INFO_EXPIRATION - ROUTER_INFO_EXPIRATION_MIN) * 300 / (_kb.size() + 1)));
     644                                          ((ROUTER_INFO_EXPIRATION - ROUTER_INFO_EXPIRATION_MIN) * 150 / (_kb.size() + 1)));
    644645
    645646        if (!key.equals(routerInfo.getIdentity().getHash())) {
Note: See TracChangeset for help on using the changeset viewer.