diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorImpl.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorImpl.java index 5b4f1a5c5..c0d79430f 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorImpl.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorImpl.java @@ -89,7 +89,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator { new Class[] { Context.class, Locale.class, File.class, String.class, String.class }; // todo: write cache never set, and never read (only written) - // (initially was the same for the read cache, why?) + // tried to use read cache for a while, but small performance improvements are not worth the work (https://github.com/Helium314/openboard/issues/307) private LruCache mValidSpellingWordReadCache; private LruCache mValidSpellingWordWriteCache; diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorProvider.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorProvider.java index a5086ddcb..718bacaee 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorProvider.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/DictionaryFacilitatorProvider.java @@ -6,16 +6,11 @@ package org.dslul.openboard.inputmethod.latin; -import android.util.LruCache; - /** * Factory for instantiating DictionaryFacilitator objects. */ public class DictionaryFacilitatorProvider { public static DictionaryFacilitator getDictionaryFacilitator(boolean isNeededForSpellChecking) { - final DictionaryFacilitator facilitator = new DictionaryFacilitatorImpl(); - if (isNeededForSpellChecking) - facilitator.setValidSpellingWordReadCache(new LruCache<>(200)); - return facilitator; + return new DictionaryFacilitatorImpl(); } }