Mobile Development 19 min read

Baidu App Low-End Device Startup Performance Optimization: A Comprehensive Guide

Baidu’s comprehensive low‑end device startup optimization—using a scoring‑based observation system, TTI metrics, automated degradation prevention, high‑performance tools such as UniKV and ABTest lock fixes, and an intelligent scheduling framework—cut cold‑start TTI by over 40% on Android and 30%‑plus on iOS.

Baidu App Technology
Baidu App Technology
Baidu App Technology
Baidu App Low-End Device Startup Performance Optimization: A Comprehensive Guide

As the mobile internet population红利 peaks and user growth slows down, companies are shifting focus from acquiring new users to serving existing ones. Low-end devices represent a significant portion of this existing user base, making performance optimization for these devices particularly crucial.

This article provides an overview of Baidu App's low-end device startup performance optimization project, covering three main areas: observation infrastructure, foundational infrastructure, and business optimization.

Key Challenges Addressed:

Complex performance issues on low-end devices with black screens and stuttering during startup

Lack of overall scheduling mechanisms across multiple businesses

High cost of problem identification due to inefficient performance tools

Incomplete monitoring mechanisms lacking degradation prevention

Observation Infrastructure:

The project established low-end device standards using a scoring mechanism, defining devices in the bottom 15% of PV/UV distribution as low-end. They implemented static scoring (based on hardware specs like CPU/GPU/memory for Android, configuration tables for iOS), dynamic scoring (based on actual performance metrics like startup speed), and comprehensive scoring (weighted combination).

Performance metrics were built around TTI (Time To Interactive), measuring from app process creation to main thread first idle. This metric effectively represents the main thread's smoothness and user experience.

Degradation Prevention Mechanisms:

Offline degradation prevention includes automated packaging, testing, analysis, and distribution through CI/CD pipelines. Online prevention covers experiment-based degradation detection and function-level monitoring with automated analysis capabilities.

Foundational Infrastructure:

Three core components were developed: efficient performance tools (Trace and Hook tools), high-performance components (including UniKV - an optimized SharedPreferences replacement, and ABTest lock optimization), and a smart task scheduling framework.

The UniKV solution addresses native SharedPreferences issues including poor first-read performance, excessive thread creation, stuttering/ANR, and poor multi-process support. It achieved TTI optimization of approximately 1.2 seconds, with 100+ files migrated and 100+ threads optimized.

ABTest optimization eliminated lock synchronization issues (200ms+ improvement), achieved 95% first-read performance improvement on mid-range devices, and resolved experiment data accuracy issues.

Scheduling Framework:

The intelligent scheduling framework takes task information and device/user/scenario profiles as input, outputting personalized scheduling, tiered experience scheduling, refined scheduling, priority-based delayed scheduling, and parallel UI rendering technology.

Results:

After 1.5 years across three phases (foundation building, breakthrough, and refined control), the project achieved: regular cold startup TTI improved 50%+ on Android and 40%+ on iOS; first startup TTI improved 40%+ on Android and 30%+ on iOS.

startup optimizationtask schedulingmobile performancelow-end-devicesPerformance MetricsAndroid Optimizationios-optimizationdegradation prevention
Baidu App Technology
Written by

Baidu App Technology

Official Baidu App Tech Account

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.