Mobile Development 19 min read

Mobile App Performance Testing, Optimization, and Shrinking Strategies for Xueersi Online School

This article details the background, analysis, and step‑by‑step solutions for reducing package size, improving cold‑start time, and establishing a comprehensive mobile performance testing framework for both Android and iOS versions of the Xueersi Online School app.

Xueersi Online School Tech Team
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Mobile App Performance Testing, Optimization, and Shrinking Strategies for Xueersi Online School

1. Background The performance project originated from the rapid increase in app downloads during the 2020 pandemic, revealing issues such as large package size, high memory usage after live streaming, and excessive network requests.

2. Initial Analysis Comparative benchmarks were performed on mobile and PC performance, as well as network interfaces. Key findings include higher memory consumption, larger package size, slower cold‑start, and inefficient logging and resource handling compared with competitors.

2.1 Mobile Performance Comparison

Live streaming process not destroyed after exit, causing high memory usage.

Excessive log reporting and redundant API calls increase upload traffic.

Cold‑start time and package size are significantly higher than peers.

2.2 PC Performance Comparison

Higher memory usage during live/recorded sessions.

Longer page load times.

Much larger installer package.

2.3 Network Interface Evaluation Issues identified include fragmented domain names, numerous logging endpoints, slower API response times, excessive front‑end probes, scattered image requests, 302 redirects exposing security risks, and heavy H5 promotional pages.

3. App Shrinking Optimization

3.1 Resource Inventory Catalog offline and embedded resources that can be removed or compressed.

3.2 Static Library Size Statistics Analyze size contributions of business and third‑party libraries.

3.3 Android Package Reduction Techniques

Design offline resource delivery for secondary modules, reducing package size by 50‑90 MB.

Implement a unified resource management and incremental diff‑delivery system with retry mechanisms and version‑aware updates.

Remove Unity 3D engine and merge media libraries, cutting another ~15 MB.

3.3.3 Pros and Cons

Pros: Standard Android API, no hook/plugin, automated packaging, incremental updates, minimal code changes, long‑term stability.

Cons: Loading screens for modules, large live‑stream module causing slower loading.

4. Building a Mobile Performance Test Framework (0→1)

4.1 Test Process QA runs automated scripts, cleans raw data with Python, uploads to a visualization platform, and iterates with developers for fixes.

4.2 Test Plan Defines scenarios, metrics, comparison dimensions, execution timing, methods, reporting, and analysis.

4.3 Metric Definitions

Cold‑start time (T1‑T3), measured via video recording, frame extraction, and SSIM comparison.

Page load time for native and H5 pages.

FPS (55‑60 for mobile, 13‑25 for PC streams).

CPU & Memory usage percentages.

Uplink/Downlink traffic (KB/s).

Package size limits (Android 70 MB, iOS 110 MB).

SLA thresholds for acceptable performance.

5. Performance Data Collection

Automation: Airtest scripts, GitLab CI, Jenkins, perfdog service.

Android cold‑start measurement via adb commands (WaitTime, ThisTime, TotalTime) and video‑frame analysis.

iOS measurement using Xcode Instruments, hook‑based logging, and screen‑recording with FFmpeg.

Guidelines to exclude splash‑ad time for fair comparison.

Tools: xrecord for screen capture, FFmpeg for frame extraction, SSIM for similarity.

6. Performance Evaluation Platform Provides log upload, parsing, multi‑version comparison, SLA monitoring, and notification features, with visual dashboards for quick insight.

7. Future Plans Continue expanding the framework to cover video bitrate, frame rate, fine‑grained telemetry, and deeper root‑cause analysis.

iOSandroidPerformance Testingmobile performanceCold Startapp optimizationresource shrinking
Xueersi Online School Tech Team
Written by

Xueersi Online School Tech Team

The Xueersi Online School Tech Team, dedicated to innovating and promoting internet education technology.

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.