I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 09548358 authored by zzz's avatar zzz
Browse files

increase translate initial map size, clear on exit

parent df381c37
No related branches found
No related tags found
No related merge requests found
...@@ -26,8 +26,8 @@ import net.i2p.util.ConcurrentHashSet; ...@@ -26,8 +26,8 @@ import net.i2p.util.ConcurrentHashSet;
public abstract class Translate { public abstract class Translate {
public static final String PROP_LANG = "routerconsole.lang"; public static final String PROP_LANG = "routerconsole.lang";
private static final String _localeLang = Locale.getDefault().getLanguage(); private static final String _localeLang = Locale.getDefault().getLanguage();
private static final Map<String, ResourceBundle> _bundles = new ConcurrentHashMap(2); private static final Map<String, ResourceBundle> _bundles = new ConcurrentHashMap(16);
private static final Set<String> _missing = new ConcurrentHashSet(2); private static final Set<String> _missing = new ConcurrentHashSet(16);
/** use to look for untagged strings */ /** use to look for untagged strings */
private static final String TEST_LANG = "xx"; private static final String TEST_LANG = "xx";
private static final String TEST_STRING = "XXXX"; private static final String TEST_STRING = "XXXX";
...@@ -184,5 +184,6 @@ public abstract class Translate { ...@@ -184,5 +184,6 @@ public abstract class Translate {
*/ */
public static void clearCache() { public static void clearCache() {
_missing.clear(); _missing.clear();
_bundles.clear();
} }
} }
...@@ -55,6 +55,7 @@ import net.i2p.util.SecureFileOutputStream; ...@@ -55,6 +55,7 @@ import net.i2p.util.SecureFileOutputStream;
import net.i2p.util.SimpleByteCache; import net.i2p.util.SimpleByteCache;
import net.i2p.util.SimpleScheduler; import net.i2p.util.SimpleScheduler;
import net.i2p.util.SystemVersion; import net.i2p.util.SystemVersion;
import net.i2p.util.Translate;
/** /**
* Main driver for the router. * Main driver for the router.
...@@ -314,6 +315,7 @@ public class Router implements RouterClock.ClockShiftListener { ...@@ -314,6 +315,7 @@ public class Router implements RouterClock.ClockShiftListener {
ByteCache.clearAll(); ByteCache.clearAll();
SimpleByteCache.clearAll(); SimpleByteCache.clearAll();
Destination.clearCache(); Destination.clearCache();
Translate.clearCache();
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment