Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From 0 to 100: Fine-tune all the things!

From 0 to 100: Fine-tune all the things!

In this session we will talk about all the performance bottlenecks that we found along the way developing the Mapbox Navigation SDK for Android. We will learn how we monitored, made decisions based on numbers and tackled them: from designing and implementing a pipeline that runs automated tests, to selecting and analyzing the data obtained so issues can be detected and after evaluating their impact fixed. We will show the tools and platforms used, such as Systrace, test @Rules and AWS Device farm.

When you are developing SDKs or libraries, their performance is crucial to your customers, especially in the context of turn-by-turn navigation. The Mapbox Navigation SDK is built on top of different components and services and contains logic needed to get timed navigation instructions. To make the calculations for these instructions, the SDK compares the user's current location to the current route being traveled along.

The entire navigation experience includes voice announcements, real-time user progress to their destination, smooth map camera animations, and detecting when a user goes off-route. As you can imagine, all of these are critical when building a navigation app but at the same time pretty heavy in terms of performance.

By the end of the talk, you will be obsessed about the performance of your application and itching to fine-tune everything!

Pablo Guardiola

August 14, 2019
Tweet

More Decks by Pablo Guardiola

Other Decks in Programming

Transcript

  1. Android Studio Profiler How does this help us? • Real-time,

    readable data • Session recording • Detailed analysis
  2. Android Studio Profiler How does this help us? • Real-time,

    readable data • Session recording • Detailed analysis • Initial signal
  3. Android Studio Profiler Does it solve our problem? • Cannot

    download or send any recorded data • Android Studio resource consumption
  4. Android Studio Profiler Does it solve our problem? • Cannot

    download or send any recorded data • Android Studio resource consumption • API 21+
  5. Custom Test Rules How does this help us? • Reproducible

    • Record and store data • Device farm
  6. Custom Test Rules Does it solve our problem? • Needs

    reliable UI test • Takes a lot of time
  7. Custom Test Rules Does it solve our problem? • Takes

    a lot of time • Needs reliable UI test • dumpsys output isn’t easily parsed
  8. Custom Test Rules Does it solve our problem? • Takes

    a lot of time • Needs reliable UI test • dumpsys output isn’t easily parsed • Output data can be unreliable
  9. Production Telemetry How does this help us? • Signal from

    “real world” usage • Larger data pool
  10. Production Telemetry How does this help us? • Signal from

    “real world” usage • Larger data pool • More devices
  11. Production Telemetry Does it solve our problem? • Production environment

    • Overhead of metric itself • Data consumption
  12. Production Telemetry Does it solve our problem? • Production environment

    • Overhead of metric itself • Data consumption • Data normalization
  13. Process Test suite @Rules Controlled routes Data generation Data processing

    Retrieve data Parse data Send data Data analysis
  14. Process Test suite @Rules Controlled routes Data generation Data processing

    Retrieve data Parse data Send data Data analysis Query data Filter out data Present results
  15. Pipeline Preparation Trigger CI Pull SDK code Build SDK AWS

    Device Farm Assemble apps Upload apps Run tests Download artifacts Completed check
  16. Pipeline Preparation Trigger CI Pull SDK code Build SDK AWS

    Device Farm Assemble apps Upload apps Run tests Download artifacts Completed check Scripts
  17. Pipeline Preparation Trigger CI Pull SDK code Build SDK AWS

    Device Farm Assemble apps Upload apps Run tests Download artifacts Parse data Publish data Completed check Scripts
  18. Pipeline Preparation Trigger CI Pull SDK code Build SDK AWS

    Device Farm Assemble apps Upload apps Run tests Mode Download artifacts Parse data Publish data Completed check Scripts
  19. Pipeline Preparation Trigger CI Pull SDK code Build SDK AWS

    Device Farm Assemble apps Upload apps Run tests Mode Download artifacts Parse data Publish data Completed check SQL (Presto) Build reports Scripts