Building a blazingly fast Android app, Part 1

LinkedIn Engineering Team
6 min readintermediate
--
View Original

Overview

This article discusses the importance of app performance in Android development, detailing how LinkedIn's performance engineering team monitors and optimizes their app. It introduces the performance operations cycle and highlights the tools and metrics used to assess app startup and page load times.

What You'll Learn

1

How to monitor app performance using LinkedIn's Harrier system

2

Why measuring app startup time is crucial for user experience

3

How to use profiling tools like Android Studio Profiler for optimization

Prerequisites & Requirements

  • Understanding of app performance metrics
  • Familiarity with Android Studio and profiling tools(optional)

Key Questions Answered

What is the performance operations cycle for the LinkedIn Android app?
The performance operations cycle consists of monitoring, profiling, optimizing, and ramping. This cycle helps maintain solid app performance and introduces improvements over time.
How does LinkedIn monitor app performance?
LinkedIn uses an in-house performance monitoring system called Harrier, which tracks app crashes, site speed, video metrics, and service call trees to ensure optimal performance.
What are the steps involved in measuring app startup time?
App startup time is measured through a series of steps: creating the app process, creating the application, launching the main thread, creating the main Activity, and view inflation, layout, and draw.
What profiling tools does LinkedIn use for app performance?
LinkedIn employs tools such as Android Studio Profiler, systrace, and Nanoscope to profile app performance and identify optimization opportunities.

Key Statistics & Figures

App startup time reduction
700ms
Since 2018, LinkedIn's Android engineers have reduced the app startup time by over 700ms, achieving a 28% improvement.
Total app startup time at 90th percentile
2.5s
The total app startup time at the 90th percentile is 2.5 seconds.

Technologies & Tools

Monitoring Tool
Harrier
Used for tracking app crashes, site speed, and overall app health.
Profiling Tool
Android Studio Profiler
Helps in profiling app performance and identifying optimization opportunities.
Profiling Tool
Nanoscope
Used for performance profiling to achieve optimization goals.

Key Actionable Insights

1
Implement a performance monitoring system like Harrier to track app metrics continuously.
This allows for real-time detection of regressions and helps maintain a high-quality user experience.
2
Regularly profile your app using tools like Android Studio Profiler to identify bottlenecks.
Profiling helps developers understand where optimizations are necessary, ensuring that performance improvements are data-driven.
3
Classify app startup time into cold, warm, and hot categories for better optimization strategies.
Understanding these categories allows developers to focus on the most impactful areas for performance enhancements.

Common Pitfalls

1
Neglecting to monitor app performance can lead to unnoticed regressions.
Without a monitoring system like Harrier, performance issues may go undetected, resulting in a poor user experience.
2
Failing to profile the app regularly can lead to missed optimization opportunities.
Regular profiling is essential to identify performance bottlenecks; neglecting this can hinder app performance improvements.

Related Concepts

Performance Optimization Techniques
App Monitoring Best Practices
Profiling Tools And Their Usage