Mobile Development 8 min read

Performance Optimization of Alibaba Xianyu Fishpond Mini-Program

The Xianyu Fishpond mini‑program was optimized by keeping its instance alive, pre‑rendering first‑screen data, reducing costly setData calls, using $spliceData for long lists, staging tab‑switch updates, and integrating native video with cover‑view, which together cut loading time, eliminated scroll jank, and slashed tab‑switch latency, delivering markedly improved performance.

Xianyu Technology
Xianyu Technology
Xianyu Technology
Performance Optimization of Alibaba Xianyu Fishpond Mini-Program

Background: Xianyu integrated the Alibaba mini‑program system and launched the Fishpond mini‑program in September. Early versions suffered from performance problems such as slow loading on low‑end Android devices (≈6 s first‑screen), scroll jank on iPhone 7 Plus (≈40 fps), and tab‑switch latency of 3‑5 s.

Mini‑program Architecture: Alibaba mini‑programs follow the Alipay model, separating logic (worker) from rendering (WebView). This brings benefits like isolated execution, shared JS runtime, and decoupled rendering, but also introduces asynchronous communication overhead between worker and WebView, especially when using setData which requires serialization and transmission.

Business‑level Optimizations

Loading Speed

Before/After screenshots illustrate the impact of several measures: keep the mini‑program instance alive, move data requests to page.onLoad with loading hints, pre‑render first‑screen data, and split first‑screen data to set only visible fields.

Scroll Jank

Before/After screenshots show reduced frame drops after limiting setData calls in onScroll , consolidating data parsing to a single setData , using $spliceData for long lists, shrinking payload size, and replacing repeated onAppear/onDisappear listeners with a single onFirstAppear for exposure tracking.

Tab Switch Lag

Before/After screenshots demonstrate splitting the tab‑switch workflow into four stages: animate tab change, scroll to sticky position, destroy old feed list and show loading, then request and render new data. This staged approach turns a high‑concurrency update into controlled phases, greatly improving smoothness.

Container‑Level Optimizations

To overcome WebView rendering limits, native video components are used, and a cover‑view layer is added to overlay UI elements (e.g., play button) on top of native video, achieving same‑layer rendering and better user experience.

Results & Future Plans

After the optimizations, the Fishpond mini‑program shows significant performance gains (see result chart). Future work includes per‑fish‑pond instance isolation, performance‑alert containers that monitor setData frequency and payload, and a full‑chain best‑practice guide for Xianyu mini‑program development.

FrontendMobileMiniProgramPerformanceOptimizationRendering
Xianyu Technology
Written by

Xianyu Technology

Official account of the Xianyu technology team

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.