I am designing an android application which gets data through REST API calls to the server. I wanted to know how to improve the performance and increase the response time. I am bothered if multiple requests are hitting the server at the same time, performance will drop drastically. Also, since the API calls are in turn connecting to the database, what would happen if the number of connections to the database has reached the maximum limit. How do I handle it? Does connection pooling help in improving the performance? Please help me in suggesting tools for monitoring the no.of requests hitting server and the response time.
-
you can use stetho along with okhttp to monitor network requests and response time. If possible you should also persist the data and hit the service when really required. – Sarthak Mittal Mar 26 '18 at 06:43
2 Answers
If you are using Android Studio
then best tool to check performance of your app is Android Profiler
. It is available in Android Studio from 3.0
, where you can measure your app's CPU, Memory and Network performance in a very good manner.
Checkout more details about Android Profiler
at the official link : https://developer.android.com/studio/profile/android-profiler.html

- 20,983
- 15
- 78
- 104
Yes, connection pooling will help. Also you might consider adding a reverse proxy in front of your API. This way URLs, which point to data that doesn't change often could be served from cache.
Now, since your data store is in a relational database you might consider SlashDB to make those APIs for you. It has connection pooling and ships with reverse proxy. https://slashdb.com
Disclaimer: SlashDB is a product of my company.

- 1,458
- 1
- 13
- 28