]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/engine/Dictionary.java
Make use of the new skippable CachingList optimizations.
[Dictionary.git] / src / com / hughes / android / dictionary / engine / Dictionary.java
index 151bad6b66bfb781fa160c8c2cebe09cc6d935aa..4543b7bbc7866a8f0ad022cc52225cfcb26e032e 100644 (file)
@@ -88,14 +88,14 @@ public class Dictionary implements RAFSerializable<Dictionary> {
 
             pairEntries = CachingList.create(
                               RAFList.create(ch, new PairEntry.Serializer(this), ch.position(), dictFileVersion, dictInfo + " pairs: "),
-                              CACHE_SIZE);
+                              CACHE_SIZE, false);
             textEntries = CachingList.create(
                               RAFList.create(ch, new TextEntry.Serializer(this), ch.position(), dictFileVersion, dictInfo + " text: "),
-                              CACHE_SIZE);
+                              CACHE_SIZE, true);
             if (dictFileVersion >= 5) {
                 htmlEntries = CachingList.create(
-                                  RAFList.create(ch, new HtmlEntry.Serializer(this), ch.position(), dictFileVersion, dictInfo + " html: "),
-                                  CACHE_SIZE);
+                                  RAFList.create(ch, new HtmlEntry.Serializer(this, ch), ch.position(), dictFileVersion, dictInfo + " html: "),
+                                  CACHE_SIZE, true);
             } else {
                 htmlEntries = Collections.emptyList();
             }
@@ -130,7 +130,7 @@ public class Dictionary implements RAFSerializable<Dictionary> {
         System.out.println("text start: " + raf.getFilePointer());
         RAFList.write(raf, textEntries, new TextEntry.Serializer(this));
         System.out.println("html index start: " + raf.getFilePointer());
-        RAFList.write(raf, htmlEntries, new HtmlEntry.Serializer(this), 64, true);
+        RAFList.write(raf, htmlEntries, new HtmlEntry.Serializer(this, null), 64, true);
         System.out.println("html data start: " + raf.getFilePointer());
         assert htmlData == null;
         RAFList.write(raf, htmlEntries, new HtmlEntry.DataSerializer(), 128, true);