SlideShare une entreprise Scribd logo
1  sur  10
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.
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):
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.
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.
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.
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
For more information on Android application development, visit http://www.xtremelabs.com
?
                 1
                 2
                 3
                 4
                 5
                 6
                 7
                 8
                 9
public ChartView(Context context) {
           super(context);

        if (isInEditMode()) {
         addFakeChartData();
                } else {
      readChartDataFromDisk();
                    }
                  }
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
For more information visit

http://www.xtremelabs.com




           Thanks

Contenu connexe

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
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
  • 8. ? 1 2 3 4 5 6 7 8 9 public ChartView(Context context) { super(context); if (isInEditMode()) { addFakeChartData(); } else { readChartDataFromDisk(); } }
  • 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
  • 10. For more information visit http://www.xtremelabs.com Thanks