mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-16 15:02:48 +00:00
revert addition of valid word cache, fixes #307
This commit is contained in:
parent
6453daf18e
commit
18aa209ee7
2 changed files with 2 additions and 7 deletions
|
@ -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<String, Boolean> mValidSpellingWordReadCache;
|
||||
private LruCache<String, Boolean> mValidSpellingWordWriteCache;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue