---
title: "Accelerating our Android apps with Baseline Profiles"
description: "Meta generates Android Baseline Profiles from production class-load and method-usage data to trigger ART install-time AOT compilation and app image creation, improving startup, scroll and navigation metrics by 3% to 40% across its apps."
url: "https://swe.quest/articles/accelerating-our-android-apps-with-baseline-profiles-5eae1308e94ba496"
canonical: "https://engineering.fb.com/2025/10/01/android/accelerating-our-android-apps-with-baseline-profiles/"
source: "Meta Engineering"
published: "2025-10-01"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["mobile","performance","runtimes","jvm","compilers"]
---

# Accelerating our Android apps with Baseline Profiles

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2025-10-01, 11 min read, Case study. Original: [https://engineering.fb.com/2025/10/01/android/accelerating-our-android-apps-with-baseline-profiles/](https://engineering.fb.com/2025/10/01/android/accelerating-our-android-apps-with-baseline-profiles/)

## Summary

Meta generates Android Baseline Profiles from production class-load and method-usage data to trigger ART install-time AOT compilation and app image creation, improving startup, scroll and navigation metrics by 3% to 40% across its apps. Cloud Profiles fell short because they help only later users in a rollout, give developers no control, are skewed toward early startup (ART treats startup as done after five seconds), and work only through Google Play. Meta samples class loads through a custom ClassLoader at a very low rate, adds method-cluster telemetry, keeps entries that appear above a frequency threshold, and feeds a human-readable profile to profgen. The inclusion threshold started at 80–90% of traces to limit code-size and memory-pressure costs, since compiled code is about 10x larger than dex. It has since dropped to 20%, and profiles now hold tens of thousands of entries.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Java & JVM](https://swe.quest/tags/jvm.md) (Languages)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)

## Prerequisites

- Android app development ([easy posts on Mobile](https://swe.quest/tags/mobile.md?difficulty=easy))
- JIT vs AOT compilation ([easy posts on Compilers](https://swe.quest/tags/compilers.md?difficulty=easy))
- Dex bytecode basics

## Keywords

Baseline Profiles, Android Runtime (ART), Cloud Profiles, profgen, Redex, Interdex Ordering, Google Play, Macrobenchmark

## Related posts

- [Android profiling now uses Perfetto via ProfilingManager](https://swe.quest/articles/android-profiling-now-uses-perfetto-via-profilingmanager-538acbb1b0bbfbfb.md): Sentry · 2026-11-02 · Medium · 3 min read · Mobile, Performance engineering, Observability
  Sentry Android SDK 8.51.0 switches profiling on Android 15+ (API 35+) from in-process Debug.startMethodTracing to Perfetto-based stack sampling via the system ProfilingManager API, while older devices fall back to the legacy profiler.
- [The Sentry Android SDK is now 20-30% faster!](https://swe.quest/articles/the-sentry-android-sdk-is-now-20-30-faster-c43bd999f6f96999.md): Sentry · 2026-10-20 · Medium · 4 min read · Mobile, Performance engineering, Java & JVM
  Sentry's Android SDK init time dropped 20-30% between versions 8.43.0 and 8.54.0, alongside reduced memory allocation, fixed leaks and up to 10% less background CPU.
- [Strobelight: A profiling service built on open source technology](https://swe.quest/articles/strobelight-a-profiling-service-built-on-open-source-technology-6a094fead0e4b62a.md): Meta Engineering · 2025-01-21 · Medium · 12 min read · Performance engineering, Observability, Linux, Cost optimization, Compilers
  Strobelight is Meta's fleet-wide profiling orchestrator, running 42 profilers (mostly eBPF-based, plus ad-hoc bpftrace scripts) on every production host with safeguards against PMU counter conflicts, concurrency limits and queuing.
- [How we wrote a Python profiler](https://swe.quest/articles/how-we-wrote-a-python-profiler-397d52e3f1db71ec.md): Datadog Engineering · 2020-10-07 · Medium · 7 min read · Python, Performance engineering, Observability
  Datadog built an always-on statistical profiler for Python because deterministic profilers like cProfile can add 2-3x overhead, too much for production.
- [An open source compositional deadlock detector for Android Java](https://swe.quest/articles/an-open-source-compositional-deadlock-detector-for-android-java-baaa0219c7853320.md): Meta Engineering · 2022-03-08 · Hard · 2 min read · Static analysis, Concurrency, Java & JVM, Mobile
  Meta built a compositional static analyzer, now part of the open source Infer framework, that detects deadlocks in Android Java code without running it.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
