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

Jailbreakers: It is safe to update to iOS 7.0.3, only if you’re on iOS 7/7.0.1/7.0.2

Apple released iOS 7.0.3 on 22 Oct 2013, with a number of Bugs being fixed and other improvements. After the official release of iOS 7.0.3 update, MuscleNerd warned jailbreakers to avoid being updated to iOS 7.0.3 as the update is yet to be analyzed the changes whether it was to be safe in upgrading. Upon the my personal review of jailbreaking i strogly recomend you in not to updating the latest version in improving your chances of jailbreaking your device. This time is no different, however if you’ve updated to iOS 7.0, iOS 7.0.1 or iOS 7.0.2 then MuscleNerd, member of the evad3rs has now confirmed that it is safe to update to iOS 7.0.3 as it does not impact the iOS 7 jailbreak that is currently in development. 7.0.3's lock screen fixes won't impact the JB (unless Apple's holding back here, hah! http://t.co/wI7A4BHZk2 ) — MuscleNerd (@MuscleNerd) October 22, 2013 @iphonesteven If you've already lost the JB by upgrading to 7.x, then yep it'...

How To : Access BBM Channels On The Web Using BBM Channels Manager

As many of the BlackBerry users load up BBM channels on their BlackBerry smartphones, the producers has also made an alternative  through desktop. You can use BBM Channels Manger through your desktop internet browser. Whether you're looking to administer an already existing channel or set up an entirely new one, it's drop dead easy to do so. You can still see the snapshots below for a clear perspective. Creating a channel using BBM Channels Manager If you've not already set up a BBM Channel and are looking to do so in the easiest way possible, then I suggest using the BBM Channels Manager website. Sure, creating one on your device isn't exactly hard either but using the site in its bigger format is always going to be easier than trying to do so from your device. You just simply hit the link below, click on 'Create a channel'. From there, you'll be asked to login with your BlackBerry ID, once logged in you'll be off to the rac...

Android L Preview Images Are Now Available For Nexus 5 And 2013 Nexus 7

Its been a while since Android L took the tech world by storm thanks to material design, the new recent menu, improved notifications, and Project Volta. Still plenty of time away from the final release, Google has provided developer preview images that can be installed on end user devices. As per Google I/O 2014 keynote, the developer preview images are available for the Nexus 5 (hammerhead) and WiFi only 2013 Nexus 7 (razor). In order to install these images, you will need to run a full factory image install, which means all your current data will be lost. Before you start do not forget to backup your data. Those wishing to revert will need to download the appropriate Nexus restore images . Install L Preview System Image. Warning: This is a preview version of the Android system image, and is subject to change. Your use of this system image is governed by the Android SDK Preview License Agreement. The Android preview system image is not a stable release, and may cont...