Here are 3 tools every Android application developer should familiarize themselves with to make their workflow more efficient and solve new problems.
In the previous article, we had discussed about 4 important tools in the Android application development workflow. Continuing with that, here are 3 more tools every Android application developer should familiarize themselves with to make their workflow more efficient and solve new problems.
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
3 Important Performance Tracking Tools In An Android Application Development Workflow
1. 3 Important Performance tracking tools in an
Android Application Development Workflow
Here are 3 tools every Android application developer should familiarize themselves with to
make their workflow more efficient and solve new problems.
In the previous article, we had discussed about 4 important tools in the Android application
development workflow. Continuing with that, here are 3 more tools every Android
application developer should familiarize themselves with to make their workflow more
efficient and solve new problems.
2. Traceview tool for Android application
performance profiling
Traceview is a tool for profiling the performance of your android application. During the
Android application development process, you can use it to see how long certain methods
take to complete, and how often it is called (good for performance critical interactions like
scrolling and activity initializing). Go to the DDMS perspective in Eclipse, select your app’s
package inside the Devices view, and click the Start Method Profiling icon (it looks like three
dashes with a red circle in the corner):
3. Not only can you invoke quick assistant in the Java editor, it’s also very useful in the XML editor. This brings us to our second tip.
The profiling begins, but it’ll look like not much is happening. Test your app by interacting
with it to do some performance limited task you’re interested in. Once you’re done, click on
the same icon to stop profiling. Traceview should automatically pop up and show your the
result of the performance profile of all the methods that executed. The structure and
analysis of Traceview is more extensive than can be explained here, check out the tool
documentation for more info.
4. Managing the memory head with Heap Monitor
tool
If you’re running out of memory, then if app becomes slower or more unstable over time,
then it’s a good idea to what objects are being created and how much space they’re taking
up. Again, go to the DDMS perspective in Eclipse. This time, in the Devices view, select your
activity and click on the Update Heap icon. Again, it’ll look like nothing is happening but in
the background Android tools is keeping track of where memory is being allocated.
5. In the same perspective, go to the Heap view and click on the Cause GC button, which
triggers garbage collection. The heap monitor will update with a chart of how much memory
is allocated what types of objects are in the heap. As you play around with the app, objects
are will be created and destroyed. The next time you press Cause GC (or when garbage
collection happens naturally), the Heap tracker will update with the latest memory analysis.
If you notice that your app allocates more and more memory as you open/close/rotate
activities, that could mean that you have a memory leak. With a properly behaving app, the
amount of memory allocated goes up and down, instead of always up.
6. Allocation Tracker tool for tracking application memory
allocation
Tracking of memory allocation is a key concern during any Android application development. Using the
Allocation Tracker to see how often memory allocation occurs in your android app. Usually, allocating
memory often is not a big deal as long as it gets garbage collected.
Sometimes, however, there are paths in your code where you want to reduce all allocations, big or small.
I’m referring mostly to often triggered UI-critical tasks such as scrolling, view binding, and drawing. Since
these sorts of methods are invoked on the main thread and are called frequently, even simple allocations
such as creating a String may affect performance. If you suspect that might be the cause, take a look at
how often allocation occurs, not just how much memory gets used. In the DDMS perspective, go to the
Allocation Tracker view and click Start Tracking. Now play with your app in an area where you suspect
memory allocations may cause hiccups in your UI. Click Get Allocations and the tool will tell you what
type of objects have been allocated while you were using the app
7. For more information on Android application development, visit http://www.xtremelabs.com
9. About Xtreme Labs:
Located in Toronto, Palo Alto, and New York City, Xtreme Labs is a leading mobile
product development company that deals in iphone app development, android
application development, blackberry applications development, custom application
development, ios app development, ipad application development, windows mobile
development and mobile application development. They have a proven track record of
success in delivering innovative solutions across hundreds of global products. As experts
in mobile agile development, Xtreme Labs works with the world's leading companies to
plan and execute their mobile strategy.
For more information visit http://www.xtremelabs.com