aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-09-13 07:53:31 -0700
committerScott Jackson <daneren2005@gmail.com>2014-09-13 07:53:31 -0700
commit97cb41ff5ee4111f892de7bf1d29a30f3fa4c175 (patch)
tree4abc2e54cc0e4c0a92763ea90c4ea7806573e969
parentf7aa1845c435e1e038794f95ab196ec331fe806a (diff)
downloaddsub-97cb41ff5ee4111f892de7bf1d29a30f3fa4c175.tar.gz
dsub-97cb41ff5ee4111f892de7bf1d29a30f3fa4c175.tar.bz2
dsub-97cb41ff5ee4111f892de7bf1d29a30f3fa4c175.zip
Fix web commit for entryLookup speedup
-rw-r--r--src/github/daneren2005/dsub/util/FileUtil.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java
index 7a8eb772..60fc6031 100644
--- a/src/github/daneren2005/dsub/util/FileUtil.java
+++ b/src/github/daneren2005/dsub/util/FileUtil.java
@@ -30,6 +30,7 @@ import java.io.RandomAccessFile;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
+import java.util.HashMap;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.Iterator;
@@ -310,9 +311,9 @@ public class FileUtil {
public static MusicDirectory.Entry lookupChild(Context context, MusicDirectory.Entry entry, boolean allowDir) {
// Initialize lookupMap if first time called
- String cacheName = Util.getCacheName(context, "entryLookup");
+ String lookupName = Util.getCacheName(context, "entryLookup");
if(entryLookup == null) {
- entryLookup = deserialize(context, cacheName, HashMap.class);
+ entryLookup = deserialize(context, lookupName, HashMap.class);
// Create it if
if(entryLookup == null) {
@@ -336,7 +337,7 @@ public class FileUtil {
if(songs.size() > 0) {
child = songs.get(0);
entryLookup.put(entry.getId(), child);
- serialize(context, entryLookup, cacheName);
+ serialize(context, entryLookup, lookupName);
return child;
}
}