0

First, sorry if my question is duplicate. However I can't find answer so I decided to ask here.I have Android app, that consumes restful json webservice, using spring rest template.

My app includes 2 layout types to display various portions of data:

  • list (card view), where each item contains 2 labels and image
  • webview containger to display html content returned from backend. Each webview fragment is intended to display details corresponding with each cardview item.

Backend is restful webservice, returning json formatted data array. Each returned json array item contains all data required: list item icon image url, fields containing item texts (title and description) and html code to be loaded into webview.

So, to display data loaded from webserwice, I used spring's resttamplate. First, all data are loaded to ArrayList, then ArrayList is set as data adapter for my card view.

It works, but performance is very poor, especially with slow network connection. For example, if backend contains 5 items, loading takes 3-5 seconds.

What is the best way to improve performance in my scenario? I suspect I need some kind of caching mechanism. Can you point me any right way?

user1209216
  • 7,404
  • 12
  • 60
  • 123
  • what underlying database are you using (MySQL, Postgres, etc)? what do the queries look like? Give us examples. – Lucas Crawford Oct 09 '15 at 18:22
  • Webservice is beyond my control, but I can propose some changes to its author, if required. I'm looking for the best I can do at client side. – user1209216 Oct 09 '15 at 20:59

0 Answers0