1

can anyone advice me some tools that can help me monitor the performance of my application ?

and tips that also can help me increasing the memory and gui usage of my application ?

some users complain that the application is too slow and I can not reproduce this issue on my device.

1
  • check out this very useful. Commented Apr 3, 2017 at 11:49

3 Answers 3

2

Read official guideline about Android Monitor Overview.

Android Monitor helps you to profile the performance of your apps so you can optimize, debug, and improve them.

Android Monitor provides a Memory Monitor so you can more easily monitor app performance and memory usage to find deallocated objects, locate memory leaks, and track the amount of memory the connected device is using. The Memory Monitor reports how your app allocates memory and helps you to visualize the memory your app uses.

Visit Also Best Practices for Performance.

Sign up to request clarification or add additional context in comments.

Comments

0

There could be many issues regarding memory usage.

  1. Too many static memory allocations. Check for static instances that you are creating in your app.

  2. Memory leaks can occur if you pass huge Java objects between your fragments without using the recommended interface design pattern. Memory leaks can also occur if you are not properly maintaining fragment state during device configuration change.

  3. Remove unwanted external libraries that are not being used. Reduce the size of your apk using proguard and lint.

Below are two links that may help you.

Manage Your App's Memory

Overview of Android Memory Management

Comments

0

There are many ways to enhance performance but we should apply the following:

  1. Use RecyclerView in place of ListView
  2. Use RetroFit to fetch Data
  3. Don't forget to Destroy objects who don't have any uses in app
  4. Instead of using library. I'll recommend you to use only classes that u wish to use. As you know to adding Library into our project, sometimes they make heavy app and also increases our app size.
  5. Always use those library that you want to use .... for eg: when we add firebase library. google-play-services are automatically plugged in so there is no need to define that dependency
  6. Keep your layout file smooth and lightweight.
  7. To load images, you can use Glide library... It gives smoothness to app

Note: For more info, you can read this official tips from android=> https://developer.android.com/training/articles/perf-tips.html

4 Comments

1- I will try to use RecyclerView, 2- I am using HttpURLConnection and native android network classes to load data, and using Asynctasks 3- Object destroying is based on garbage collector, 4- Yes I am using a lot of libraries and almost all of them is sdks like (zendesk, zopim, appboy, quickblox and sinch) and some other libraries and can not stop using them 6- Layouts is lightweight, 7- I am using universal image loader
You can use retrofit for network calls. It is faster than AsyncTask and Volley.
yes, for the connection you can use Retrofit and also there are some other tips like:
1. you can use for each loop bcoz its faster then others and 2. Use Static Final For Constants 3. Avoid Internal Getters/Setters 4. Avoid Using Floating-Point 5. I used sinch and i would say that its necessary and we can't break this kind of library but if you have a library that you can break and use then just break :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.