Page 1 of 3
1 single lag after start up
Posted: Thu May 26, 2011 3:03 pm
by dbum
Hello,
using Android 2.3.3 on a Galaxy S2 I have the following problem.
- wake phone
- launch sms app for example
- smart keyboard opens up very quickly
- start typing - LAG after the first letter - then becomes all smooth again for the rest of the typing
So it seems Android (i don't use a task killer) had killed smart keyboard and when I start typing it needs to load its stuff into the RAM again. Maybe the user dictionary since it lags exactly the moment i hit the first letter but how do I know..
Is there a way for me to fix this, or is there a way for you to fix this generally, cyril?
Thanks in advance and best regards
Daniel
Re: 1 single lag after start up
Posted: Fri May 27, 2011 8:29 am
by cyril
This is something I want to improve in the next versions. CPU-consuming initialization tasks are supposed to be done asynchronously, but it seems something is still taking time when the first letter is typed indeed.
Re: 1 single lag after start up
Posted: Fri May 27, 2011 5:26 pm
by dbum
Brilliant! Thanks for answering, I am very much looking forward to this since it would complete this otherwise excellent keyboard for me.
Re: 1 single lag after start up
Posted: Thu Jun 09, 2011 2:00 pm
by noble
I am also a victim of this irritating lag
I have SGS2 now but lag appear also with SGS. I have found that suggestion bar is a main reason for lag. Lag appear when you press first letter and smart keyboard pro will load suggestion bar. Can you guys fix that bar will already load same time as keyboard? Or otherwise improve that? I cannot disable suggestion bar in daily use because I think it is one of the greatest feature of this keyboard.
Re: 1 single lag after start up
Posted: Thu Jun 09, 2011 3:24 pm
by cyril
Well, there is no such thing as "loading the prediction bar". However it's true that the dictionaries are loaded on demand, i.e the first time text is entered. This is done in a separate thread so it should not block the UI, but it takes CPU resources so it can indeed impact the UI thread anyway. As loading the dictionaries (especially the smart dictionary) can take several seconds, I'm not convinced that doing it as soon as the keyboard is visible will completely solve the problem, but it's worth trying. I will post a beta later so that you can try.
Re: 1 single lag after start up
Posted: Thu Jun 09, 2011 3:51 pm
by noble
Yeah, if you figure out what there is a problem and make a beta I can test it.
By the way I don't know what is the reason but with SGS+CM there was no lag with 1st letter. With other roms (stock and custom) there was that lag. I don't have that SGS anymore but I think SGS2 should have enough power to handle some tasks

Re: 1 single lag after start up
Posted: Thu Jun 09, 2011 5:17 pm
by noble
cyril wrote:Well, there is no such thing as "loading the prediction bar". However it's true that the dictionaries are loaded on demand, i.e the first time text is entered. This is done in a separate thread so it should not block the UI, but it takes CPU resources so it can indeed impact the UI thread anyway. As loading the dictionaries (especially the smart dictionary) can take several seconds, I'm not convinced that doing it as soon as the keyboard is visible will completely solve the problem, but it's worth trying. I will post a beta later so that you can try.
A correction: after testing it seems you are right. Loading the smart dictionary take several seconds and makes that lag. If I disable smart dictionary there is no lag. No lag even prediction bar is enabled.
So is there change to improve smart dictionary?
Re: 1 single lag after start up
Posted: Thu Jun 09, 2011 9:44 pm
by cyril
Yes actually I was wrong, the dictionaries are already loaded as soon as the keyboard is shown (even before actually). There is definitely room for improvement for the smart dictionary; today it's based on a standard Android sqlite database, which may not be the most efficient method. I will check if quick optimizations are possible, otherwise I will need to rewrite everything...
Re: 1 single lag after start up
Posted: Fri Jun 10, 2011 3:39 am
by noble
At morning there was still lag even with smart dictionery. Now I disable all dictioneries, suggestions and quick fixes. After that it seems to be better.
Re: 1 single lag after start up
Posted: Fri Jun 10, 2011 9:52 am
by cyril
Well, there is no magic, everything comes with a cost.
Anyway in the latest
beta I changed a bit the way the smart dictionary is loaded, and now only the current language is loaded when the keyboard is shown, whereas everything was loaded before. Of course it will only make a difference for people using several languages, but it's better than nothing to start with.