Skip to main content

How To Reduce Overdraw in Your App to Increase UI Performance

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

Popular posts from this blog

How to Root the Motorola Droid Pro [Root Guide] - From Android 2.3 Gingerbread to Jelly Bean

Unfortunately for the Motorola Droid Pro users there was no further updates regarding the device, meanwhile other device with the same specification as that of the Droid Pro are using ICS and Jelly Bean, Motorola's Droid Pro is still on Android 2.3 Jelly Bean. So feeling to get your Motorola Droid Pro into a Root ed Device ? Then i may recommend you in doing so as, Rooting helps you keep updated to superior features like ability to install root only apps, and even to uninstall system files and protected unwanted stock apps. So if you are planning to do rooting, don't think over more other than its just a simple free process that does't need any expert skill but all you need to do is to keep a keen attention over the process! So lets get started! Disclaimer : Attempt this at your own Risk! Recommended that you may please read the detail Disclaimer before your proceed. By reading this you may Please accept our policies to get the instructions leading you root your D...

Nexus 5 Debate Over Ubuntu Vs Android

Its really been a busy schedule in the mobile industry with launch of several new phones in the market aiming the festive season ahead. And one of the most awaited devices is the Google Nexus 5 smartphone and now there is a Nexus 5 debate over Ubuntu vs Android. Already there were several leaks and rumors about the upcoming Google Nexus 5. And one of the most interesting factor for owning an Nexus device is that the pure Google Android experience. Another aspect of using a Nexus phone is the appeal of being able to customize the device. As per the latest news the Google Nexus 5 is expected to come with the latest Android 4.4 Kitikat and the buyers are really excited for the launch of new nexus and the new operating system. We noted that as the Ubuntu for Phones operating system was also due to arrive in October, this could be exceptionally interesting for those waiting for the Nexus 5. Since then we’ve heard that the Ubuntu Touch OS is heading for an October 17 release....

How to turn off the caps lock key on your mac in a way something differntly ?

I think it might not be something you can fell good about being receiving you mails all written in capital letters, but it can't be their fault typing on accidentally can switch the caps key on without any notice. I suppose, since it's fairly easy to hold on the shift key if you need some caps in between but for the today's smaller laptops with an small keypad, it might be seen a bit tough. Here am with such a solution that will clear everything, since its quite easy to actually turn the caps lock key off on your Mac and here's the how to, So firstly Launch the System Preferences, either from the Dock, or the apple Menu, or even the Applications Menu. So, once you launched, click on the drop menu next to caps Lock key title, and choose the No, Action. Now, whenever you hit the Caps Lock key by, mistake, nothing will happen. So if you wanna turn the caps lock key back on, all you wanna do is just simply do the above steps again, but this time set the...