Fastest Method To Insert Words Into Userdictionary
I would like app to add several (2k) words to UserDictionary. I have experimented with ContentResolver().insert/bulk insert.... // array of words String[] words = getResources
Solution 1:
Specific to your case: Adding 2000 words in the dictionary at a stretch will take time and there is not much of an optimization which can be done. The time you see here are for the file operation and moving from Java->NDK->Native operation.
General: Irrespective of the method used, one has to understand that these are nothing but file operations and is bound to take time. The APIs (including SQLite related) are just a wrapper to the intended file operations in the native code. Natively file write will always take a longer time then file read.
Post a Comment for "Fastest Method To Insert Words Into Userdictionary"