App performance is the only way on which users enjoy their app, and to achieve this all that we should do is just reducing the lag. Accordingly there are many ways in achieving it and a few among the important is by
(I) Using Multithreading
(II) Simplifying view hierarchy
(III) Reducing overdraw
So, I will explain you how in reducing the Overdraw. Pixel overdraws may occur when an app repaints a pixel multiple times. Its actually something that we wont have taken into the consideration but, its just something we should take more care about. It’s a fact and this can even take massive effect in the performance of the app.
So lets get started,
(1) Enabling Profiling
Under the Developer settings you can find some features that help the developers. Android fortunately made some build in tools to help the developers. So what you have to turn on is
(I) Force GPU Rendering
(II) Show GPU Overdraw

(2) Now Restart the app that you want to profile and there is it : You can see the areas if the screen are painted in variety of colors!
Note that : These colors do have some significant meaning.
No color : No Overdraw. The pixels were painted only once.
• Blue 1x Overdraw
• Green 2x Overdraw
• Light Red 3x Overdraw
• Dark Red 4x Overdraw
(3) Now lets fix the problem
All you have to do is just go in the XML Layout files and look for the areas of overlap. The biggest issue is when you are drawing backgrounds on top of each other.
I will explain to you with an example :
In some cases drawing 4 backgrounds , one for :activity, List-view,List item and for the fragment. Accordingly then the text was drawn on top, as the image was at the bottom of the post suggests it wasn't that pretty and the solution was simple and the code was “android:background=”@null” and what to do here is just remove the unnecessary background. This results in improving the scrolling performance of the app as tested.
Still having more doubts related just visit Android Performance Case Study (Ext Link)

Comments
Post a Comment
comment your views !