You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, given that the stroke data is a constant map, is it possible to bake it into the class so that I don't need to load it every time? Or, can we do something completely different that isn't so memory intensive?
The text was updated successfully, but these errors were encountered:
To avoid loading the whole dataset, I would suggest that you ship it as a sqlite database. That way you can add index columns based on prefix characters and let sqlite filter candidates for you. A script to build a sqlite3 database and populate it with the Conway dataset should be a reasonable project for a beginner.
I don't know very much about programming, so I have produced a rather crappy implementation of the stroke input method.
In particular, I load all the stroke data into memory when the input method service is instantiated:
stroke-input-android/app/src/main/java/io/github/yawnoc/strokeinput/StrokeInputService.java
Lines 153 to 167 in c94a809
It works, but the downsides are:
Most of the time is spent during
loadSequenceCharactersDataIntoMap
. Is there a better way of reading a TSV than what I currently have?stroke-input-android/app/src/main/java/io/github/yawnoc/strokeinput/StrokeInputService.java
Lines 220 to 252 in c23d584
Alternatively, given that the stroke data is a constant map, is it possible to bake it into the class so that I don't need to load it every time? Or, can we do something completely different that isn't so memory intensive?
The text was updated successfully, but these errors were encountered: