Hi :wave: I was working in existing application in...
# android
k
Hi 👋 I was working in existing application in which it has more than 5 api calls in the viewmodel through retrofit. When fetching api call it has showing loader to main screen and block user untill we get data from response. Some are dependent to each other but some are not i.e. Login session dependent on customer data etc. All response are huge in data so may be it taking time to load. I read the review from play store, its frustrations for user and giving bad reviews. This project is growing day by day. I know you guys asked why this api calls in single screen and reason behind this is the application is healthcare. We make a survey from customer and they want there results in homepage. I already read the doc and everything is up to according to doc. I don't want spoonfed, but I need guidance for you guys. Many thanks
😶 3
d
1. If api response is slow we can’t do anything. 2. If suppose api response is fast try to call asynchronously , if you call 1 by 1 definitely it will get delay. if you already following asynchronous you have to check and there will be a chance to change the app or api flow or architecture(then it is a big change) If all good, you have to check the data handling, except session data you have to make everything as asynchronous. Make sure backend response fast should be in ms even 1 second is fine. But not more then 1sec.
👍 1
k
@DINESH S thanks for your guidance. I just checked over backend apis min response time is below 2 sec average. Is it very bad ?
d
2 sec average per request, but you said some need to wait for the previous one to finish, how many requests do you have "chained"? How often does the data change? Could you cache it/save to disk and show stale data?
k
Yes 3 are chained together. Data change when user purchase anything or waiting for result. Also we are providing consultation so any it will change