iOS

How to Build a Continuous Optimization System for iOS from Development to Operations

2025-10-29

Preface

Today, with the rapid development of mobile Internet, the performance experience of App almost directly determines the user retention rate. Due to the relatively concentrated number of device models on the iOS platform, optimization may seem less difficult on the surface, but as business complexity increases, performance issues continue to emerge: lagging, fast power consumption, network latency, crashes

If the development team only locates and solves problems after they arise, it is often too late. Therefore, establishing a continuous performance monitoring system and coordinating different tools at each stage is the core means to enhance user experience.


1、 The Three Core Stages of Continuous Performance Monitoring

In a complete app lifecycle, performance monitoring can be roughly divided into three core stages

  1. R&D stage: focusing on code level performance optimization, quickly identifying bottlenecks.
  2. Testing phase: Focus on scene and device diversity to ensure stability in different environments.
  3. Operation and maintenance phase: Collect real user data through online monitoring and continuously optimize.

Different stages require different tools to build complementary performance monitoring chains.


2、 R&D stage: Code level performance analysis

The most common problem for R&D personnel is the performance overhead caused by code efficiency and logical implementation.

At this stage, the selection of tools should lean towards in-depth analysis and immediate feedback.

  • Xcode Instruments
    • Provide modules such as Time Profiler, Memory Allocations, Energy Log, etc., suitable for capturing CPU, memory, and energy consumption hotspots.
    • For example, in complex animations, developers can use Core Animation tools to visually observe rendering performance and avoid frame drops.
  • Clang Sanitizers
    • Addressing implicit issues such as memory leaks and thread competition can help developers avoid potential performance risks during the coding phase.
    • Through these tools, teams can reduce unnecessary performance waste at the 'source'.


3、 Testing phase: Multi dimensional real machine verification

Even if the code has been optimized well during the development phase, it still cannot cover the differences in different models, network environments, and user behavior patterns. The responsibility of the testing team is to conduct stress and stability verification in multidimensional scenarios.

  1. KeyMob
    • Support real-time monitoring of CPU, GPU, and memory usage of iOS devices without jailbreaking FPS、 Network requests and energy consumption.
    • The feature is that it can record data for a long time and generate intuitive charts, which is suitable for performance regression.
  2. Charles / Proxyman
    • Focusing on the network layer, testers can observe the response speed and stability of the app in weak networks, packet loss, and other environments.
  3. XCTest + Performance Test
    • Apple's native testing framework can write performance benchmark test cases to verify whether the execution time of key methods exceeds expectations.
    • At this stage, the goal is to ensure that the app remains stable and smooth in different environments, avoiding users from experiencing performance degradation in real-world scenarios.


4、 Operation and Maintenance Stage: Collection and Analysis of Real User Data

After the application goes online, the focus of performance optimization shifts to real user usage. At this stage, developers can no longer rely on local debugging and need to continuously collect and analyze online performance data.

  • Firebase Performance Monitoring
    • It can collect indicators such as startup time, interface loading time, and network latency from real users to help quickly identify regional or version specific performance issues.
  • KeyMob History and Log Export
    • It is possible to export a performance history of 6 months, which developers can use to analyze performance changes before and after version upgrades, or compare energy consumption differences on different devices.
  • Crashlytics / Sentry
    • Used to capture crash information in real-time and combine it with performance data to determine whether there are anomalies caused by performance degradation.
    • The key to this stage is to continuously improve and respond quickly to issues through online data, rather than waiting for user complaints before taking action.


5、 Practical case: Cold start optimization of news apps

A certain news application received user feedback during its initial launch: slow startup speed and long homepage loading time. The team has adopted the following optimization process:

1、R&D phase

Using Instruments' Time Profiler to locate the issue, it was found that the JSON parsing and image decoding during the cold start phase were too time-consuming.

2、testing phase

By comparing the startup time on multiple devices with Kemo, it was found that low-end models take more than twice as long as high-end models.

Further verification in Charles' weak network environment confirmed that network latency exacerbated startup lag.

3、Operation and maintenance phase

After going online, monitoring data through Firebase revealed that the optimized new version reduced the average startup time by 40%.

Based on Kemo's energy consumption records, it has been confirmed that battery consumption has decreased and user retention rate has increased.

This case demonstrates that only by relying on a combination of multi-stage and multi tool monitoring can we truly establish a closed loop and solve performance issues in user experience.


summary

IOS performance monitoring is not a task that can be independently completed by a single tool, but a continuous process involving development, testing, and operations.

Developers use Instruments and Sanitizers to optimize code at the source.

The testing team used tools such as Kemo and Charles to verify performance stability from the perspectives of real machines and scenarios.

The operations team relies on platforms such as Firebase and Crashlytics to collect real user data and continuously iterate.

Only by connecting these tools and processes can a complete iOS performance monitoring system be built to help the team stand undefeated in the fiercely competitive market.


more stories
See more