SMILEConsortium / smile_teacher_android

The SMILE Teacher Android App
http://www.smileconsortium.org
Apache License 2.0
1 stars 2 forks source link

"Use prepared questions" screen can take time to load #109

Open chrqls opened 10 years ago

chrqls commented 10 years ago
The problem

If we have a lot of IQSets preloaded in IQManager with sometimes images in them (in my case 9 IQSets containing 7-8 questions + an IQSet of 23 questions), the screen "Use prepared questions" can take a lot of time to load (between 20-30s to display).

The reason

If we have 10 iqsets, the teacher app makes 10 requests /smile/iqset/<key> to the server to get specific values such as the number of questions or the data to preview the iqset ( because /smile/iqsets does not deliver these values)

The solution

To fix this performance issue, that might be interesting to prepare these data directly from the server, at least adding the size of each iqset in /smile/iqsets

truedat101 commented 10 years ago

Can you quantify how long the wait time is?

truedat101 commented 10 years ago

If wait is longer than 3 seconds, we should put loading into an AsyncTask, and put up a "progressbar" type dialog.

chrqls commented 10 years ago

I have to find a way to get the size of an iqset directly from the server in a JSON request instead of calculate the size of each IQSet on teacher tablet. In my opinion, this is not a job that should be done on android side. I have to see if I can change on _node_smileteacher the JSON returned when I load the list of iqset.

truedat101 commented 10 years ago

Depends on how your get the iqset. One way is to get it as a JSON object, and another way is to get it as a list.