3 Important Performance Tracking Tools In An Android Application Development Workflow

7,453 views

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,453
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
49
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

3 Important Performance Tracking Tools In An Android Application Development Workflow

  1. 1. 3 Important Performance tracking tools in an Android Application Development WorkflowHere are 3 tools every Android application developer should familiarize themselves with tomake their workflow more efficient and solve new problems.In the previous article, we had discussed about 4 important tools in the Android applicationdevelopment workflow. Continuing with that, here are 3 more tools every Androidapplication developer should familiarize themselves with to make their workflow moreefficient and solve new problems.
  2. 2. Traceview tool for Android application performance profilingTraceview is a tool for profiling the performance of your android application. During theAndroid application development process, you can use it to see how long certain methodstake to complete, and how often it is called (good for performance critical interactions likescrolling and activity initializing). Go to the DDMS perspective in Eclipse, select your app’spackage inside the Devices view, and click the Start Method Profiling icon (it looks like threedashes with a red circle in the corner):
  3. 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. 4. Managing the memory head with Heap Monitor toolIf 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 takingup. Again, go to the DDMS perspective in Eclipse. This time, in the Devices view, select youractivity and click on the Update Heap icon. Again, it’ll look like nothing is happening but inthe background Android tools is keeping track of where memory is being allocated.
  5. 5. In the same perspective, go to the Heap view and click on the Cause GC button, whichtriggers garbage collection. The heap monitor will update with a chart of how much memoryis allocated what types of objects are in the heap. As you play around with the app, objectsare will be created and destroyed. The next time you press Cause GC (or when garbagecollection 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/rotateactivities, that could mean that you have a memory leak. With a properly behaving app, theamount of memory allocated goes up and down, instead of always up.
  6. 6. Allocation Tracker tool for tracking application memory allocationTracking of memory allocation is a key concern during any Android application development. Using theAllocation Tracker to see how often memory allocation occurs in your android app. Usually, allocatingmemory 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. Sincethese sorts of methods are invoked on the main thread and are called frequently, even simple allocationssuch as creating a String may affect performance. If you suspect that might be the cause, take a look athow often allocation occurs, not just how much memory gets used. In the DDMS perspective, go to theAllocation Tracker view and click Start Tracking. Now play with your app in an area where you suspectmemory allocations may cause hiccups in your UI. Click Get Allocations and the tool will tell you whattype of objects have been allocated while you were using the app
  7. 7. For more information on Android application development, visit http://www.xtremelabs.com
  8. 8. ? 1 2 3 4 5 6 7 8 9public ChartView(Context context) { super(context); if (isInEditMode()) { addFakeChartData(); } else { readChartDataFromDisk(); } }
  9. 9. About Xtreme Labs:Located in Toronto, Palo Alto, and New York City, Xtreme Labs is a leading mobileproduct development company that deals in iphone app development, androidapplication development, blackberry applications development, custom applicationdevelopment, ios app development, ipad application development, windows mobiledevelopment and mobile application development. They have a proven track record ofsuccess in delivering innovative solutions across hundreds of global products. As expertsin mobile agile development, Xtreme Labs works with the worlds leading companies toplan and execute their mobile strategy.For more information visit http://www.xtremelabs.com
  10. 10. For more information visithttp://www.xtremelabs.com Thanks

×