Performance Optimization of First-Frame Rendering in iOS Live Streaming (iQIYI Qixiu App)

By combining telemetry, Xcode Time Profile analysis, and a state‑machine‑driven deferment of playback until UI layout completes, the iQIYI Qixiu iOS team eliminated main‑thread SetFrame blocking and streamlined room‑data handling, boosting instant‑play success from roughly 56% to 78% and markedly improving first‑frame rendering latency.

iQIYI Technical Product Team
iQIYI Technical Product Team
iQIYI Technical Product Team
Performance Optimization of First-Frame Rendering in iOS Live Streaming (iQIYI Qixiu App)

In video live streaming, the speed of first‑frame rendering directly impacts user experience. Users often encounter a long pause on the background image before the live video appears, which is unacceptable.

To improve the viewing experience on iQIYI's live streaming and short‑video platform Qixiu (iOS), the team optimized the "Qixiu instant play" feature, focusing on business logic and visual aspects.

Problem Identification

The playback process from entering a live room to the first frame involves several stages. Two methods were tried to locate time‑consuming logic:

(1) Logging timestamps before and after methods.

(2) Using telemetry points (event tracking) to send timing data to Sensors Analytics.

Logging proved unreliable due to limited test runs and varying network conditions.

Solution Approach

The final approach combined telemetry with Xcode’s Time Profile tool. The instant‑play process was divided into key phases: entering the room, receiving room data, preparing playback, and first‑frame render success. Timing data from version 5.5.0 showed that the room‑data parsing and playback phases were the longest.

Using Time Profile, two main bottlenecks were identified:

(1) The player’s SetFrame operation blocked the main thread for a long time.

(2) Processing the room‑interface response consumed significant time.

Mitigation Measures

1. SetFrame Blocking : A state machine was introduced to defer all playback operations until the system signaled that UI layout was complete. After this change, the instant‑play success rate returned to around 56% and the stutter issue disappeared.

2. Room Data Processing :

Modularized initialization to control loading timing and decouple features from the live room.

Consolidated all network requests to a single main‑thread dispatch, eliminating repeated async‑to‑main calls.

These changes raised the instant‑play rate to roughly 78%.

Additional Adjustments

For the vertical swipe‑to‑switch‑room interaction, visual tricks were applied to make the switch feel faster by delaying UI creation until room data is available, giving the impression of quicker playback.

Further technical improvements considered include pre‑loading the next room’s data during swipe gestures and exploring a dual‑player architecture to eliminate latency, though the large playback core makes the dual‑player solution costly.

Conclusion

Through logical and visual optimizations, the instant‑play rate was increased to about 78%. Future work will continue to refine module management, delayed loading, and possibly adopt a dual‑player approach to further enhance user experience.

mobile developmentPerformance optimizationiOSlive streamingprofilingFirst Frame Rendering
iQIYI Technical Product Team
Written by

iQIYI Technical Product Team

The technical product team of iQIYI

0 followers
Reader feedback

How this landed with the community

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.