Improving Application Performance with Mobile Monitoring [Video]
Join the DZone community and get the full member experience.
Join For Free[this article was written by erica lauer vose]
new relic university just posted a new relic mobile video tutorial that will walk you through how to troubleshoot a few common application performance problems. the tutorial focuses on using the interactions dashboard, interaction traces, crash reports, and the http requests dashboard to get at the underlying cause of performance problems.
the data you see in the tutorial comes from the new relic mobile team’s test app, affectionately nicknamed “the worst app in the world.” this app has several common performance problems intentionally built into it to help you learn how you can use new relic mobile to monitor and diagnose problems to improve application performance.
watch the full tutorial below:
identifying the problem
at first glance at the data from this app, it’s easy to see that something is going on with performance. notice the execution time chart, the crash rate chart, and the http response time chart.
these three charts are the most important and are centered at the top so you can quickly see the performance data you need. the execution time chart goes to the interactions dashboard, the crash rate chart goes to the crash dashboard, and the http response time chart goes to the http requests dashboard.
the rest of this dashboard displays additional helpful information, but the heart of the mobile monitoring product is the interactions and crashes dashboards, which is where we spend most of our time in this tutorial.
getting familiar with the interactions dashboard
to begin, we look at the interactions dashboard. when you scroll over the top interactions by average time, you will see that mdscrolllistvc is taking almost 7.5 seconds—a response time that would be frustratingly slow for your users.
when we open this interaction, it becomes clear that there’s something big and time consuming on the ui thread or main thread that probably shouldn’t be there. notice the wordlist.items on the main thread, with a response time of over 6.5 seconds. that’s a whole 6 seconds users are waiting for the app’s ui to load and function. this looks like something that really should be on the worker thread or some kind of background thread.
from here, we open an interaction trace that took over 7 seconds, which reveals some interesting data.
you can see in the top row that memory usage is growing considerably over time as it’s calling a whole string of methods one after the other on the main thread. so every time the mdscrolllistvc method gets called, it prevents the ui from loading properly, makes the app unresponsive, and creates an overall poor user experience.
checking out crashes
next, we look at a crash summary report from the crashes dashboard. at the top we can see this crash has happened two times and affected two unique users. below this is information about the devices and os version the users were on when the crashes occurred.
the crashes chart isn’t as interesting here because we have so few crashes, but in an app with higher traffic we might use this chart to see if there are noticeable patterns in the number of crashes or the days and times when they occurred.
below the chart are navigation buttons that let you click through each of these crashes, so you can view the interaction trail and other details.
this interaction trail is interesting because it allows you to see the exact flow the user went through to get to this crash, which is helpful when you need to duplicate their steps. there may be a complex flow you can’t reproduce otherwise, and the crash report you get from the user is just a stack trace that doesn’t tell you what the user did beforehand to cause a crash.
this is especially true in cases where the flow is nonstandard, and users are possibly doing something in the app you don’t necessarily want them to be able to do. this can also be helpful in cases where you need to find the right point in the interaction trail and look at a specific interaction trace to see if there might be something unexpected or wrong in the controller or in the code.
getting to the source of the problem
below the interaction trail are the exception details: the name impossible exception, the class and method names mdpremisevc.m and mdpremisevc handleaction3, the time, and the message “no sense in pretending!”
below this is the stack trace with the thread that had the flaw in it. you’ll notice right away that one row is highlighted in red; this is where the flaw in the code was detected. it’s even telling us what line of code the flaw is in: line 64.
finally, we look at one final problem in this app on the http requests dashboard.
if we suspect the size of the images is an issue, we can resort the list to show endpoints by transfer size. and, sure enough, we discover that the site insidefandb.com (indicated by the purple line in the chart) is not only taking an enormous amount of time, but it is also second in the list for data transfer size.
by looking at the average data transfer chart for insidefandb.com we can see that it’s transferring 5.79 megabytes, which is quite large, especially considering the app is only displaying thumbnails.
it seems clear here that this app could easily recover quite a lot of performance speed from all endpoints by requesting much smaller images.
are you ready to give this process a try on your own mobile app? watch the full new relic university tutorial above and you can learn how to troubleshoot your app’s performance problems with new relic mobile.
Published at DZone with permission of Fredric Paul, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Low Code vs. Traditional Development: A Comprehensive Comparison
-
Implementing RBAC in Quarkus
-
JSON to PDF Magic: Harnessing LaTeX and JSON for Effortless Customization and Dynamic PDF Generation
-
Kafka: The Basics
Comments