Memory Footprint: UUID Conversion

Saving RAM by clearing data after it's no longer needed by UUID
conversion code.
This commit is contained in:
ryanhamshire committed 2014-10-09 15:13:19 -07:00
1 parent 3ffb02e51e
commit e7b649810e
2 files changed
+7 -1

No files matched your search

@@ -109,6 +109,12 @@ public abstract class DataStore
this.saveClaim(claim); this.saveClaim(claim);
} }
//clean up any UUID conversion work
if(UUIDFetcher.lookupCache != null)
{
UUIDFetcher.lookupCache.clear();
}
GriefPrevention.AddLogEntry("Update finished."); GriefPrevention.AddLogEntry("Update finished.");
} }
@@ -26,7 +26,7 @@ class UUIDFetcher {
private final boolean rateLimiting; private final boolean rateLimiting;
//cache for username -> uuid lookups //cache for username -> uuid lookups
private static HashMap<String, UUID> lookupCache; static HashMap<String, UUID> lookupCache;
public UUIDFetcher(List<String> names, boolean rateLimiting) { public UUIDFetcher(List<String> names, boolean rateLimiting) {
this.names = names; this.names = names;