JioSaavn 將應用程式啟動時間縮短 30%,每日活躍使用者人數也因此增加
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
JioSaavn 成立於 2007 年,是首屈一指的音樂與 Podcast 音訊串流服務。他們與 900 多個唱片公司合作,並推出超過 8,000 萬首曲目,並支援 16 種語言。JioSaavn 應用程式也支援 6 種當地印度語言。
JioSaavn 的技術堆疊支援每月活躍使用者超過 1 億名,因此能大規模快速地運作。一般來說,這類目標對象的 Android 手機資源有限,因此使用者體驗對 JioSaavn 團隊至關重要。
挑戰
從工程的角度來看,要順應瞬息萬變的環境進行最佳化調整,既充滿挑戰又有趣。JioSaavn 面臨的挑戰是要針對低階行動裝置,為主要目標對象提供最佳使用者體驗,主要應用在印度的第 2 層和 3 座城市。
分析漏斗後,即可確定有很大一部分是願意啟動應用程式,但不聆聽歌曲的使用者。因此,我們的團隊判定應用程式啟動時間是解決這個問題的原因。因此,改善應用程式的啟動時間,會造成應用程式的事件監聽器增加。
方法
JioSaavn 運用全方位的分析和強大的工具組合 (例如 Perfetto、dumpsys 等),分析這個問題並成功達成永續發展目標。團隊透過兩項原則來克服這個難題:平行作業和延遲。
在 Google 的分析的協助下,團隊決定了工作的優先順序:
- 使用 systrace 和 Perfetto 研究應用程式流程、分析問題點,驗證應用程式的啟動時間改善情形。
- 延遲初始化:找出在首頁顯示之前,可能會延遲初始化的片段/執行個體/類別初始化 -
- 廣告
- 音樂服務 (前景服務) 和播放器資源 (例如 ExoPlayer、快取播放器佇列等)
- 啟動時最小化的播放器片段。
- 隨選初始化:需要程式庫時以及程式庫的初始化時間 (例如 Facebook lib)。
- viewStubs:檢視加載作業和資源載入過長。該團隊使用 viewStubs 簡化版面配置,並將圖片轉換為 WebP。
- 工作站執行緒:部分不需要 UI 執行緒的工作已移至 b/g 執行緒,釋出 UI 執行緒。
- 分割快取資料 - 讀取及剖析檔案中的大量快取資料需要耗費大量時間。團隊劃分為重要資料 (顯示首頁時必須顯示) 和非關鍵資料。
- 非同步 LayoutInflater:部分首頁 recyclerview 已使用 Async LayoutInflater 預先加載部分檢視畫面。
使用的工具 - Perfetto、Systrace、Google Play Vitals、Android Studio 分析器、Firebase Performance SDK
成果
為了維持應用程式穩定性,JioSaavn 團隊已將這些變更發布至多個版本。新創成果如下:
- 在所有裝置上,應用程式啟動時間縮短 30%,低中裝置的啟動時間也減少了 35% 至 40%。
- 主畫面瀏覽者/ 每日活躍使用人數提高了 5%,導致跳出率降低。
這個最佳化練習讓整個團隊齊聚一堂。他們已完成詳盡的逐步操作說明,讓團隊熟悉相關異動,並推動著重成效的做法,朝著應用程式邁進。
「JioSaavn 的目標是提升來自印度各地區和城市的
使用者享有的聆聽體驗,並且以可負擔性的方式跨越整個頻譜。有鑑於此,我們不斷克服了當地行動連線基礎架構
想要針對使用者裝置功能提供最佳使用者體驗,是一大挑戰。多虧 Google 的開發人員關係指引,我們才能朝這個方向邁進。」
- JioSaavn 產品團隊
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# JioSaavn increases DAUs by improving app startup time by 30%\n\nFounded in 2007, JioSaavn is a leading audio streaming service for music and podcasts. They have 900+ label partnerships and stream 80+ million tracks in 16 languages. JioSaavn app is also available in 6 regional Indian languages.\n\nWith a tech stack that supports over 100 million monthly active users (MAUs), JioSaavn operates at scale and speed. This audience usually has resource-limited Android phones, making their user experience of paramount importance to the JioSaavn team.\n\nThe Challenge\n-------------\n\nOptimizing in an environment of constraints, like those found in low-mid end mobile devices, can be both challenging and exciting from an engineering perspective. The challenge JioSaavn faced was to optimize user experience for their key target audience using low-mid end mobile devices and primarily found in Tier 2 \\& 3 cities of India.\n\nAnalysing the funnel, it was evident that there was a considerable section of users who would launch the app but not listen to a song. The team determined the app startup time to be the cause for this. Thus, improving the app startup time was associated with an increase in the number of listeners on the app.\n\nHow They Did It\n---------------\n\nJioSaavn relied on comprehensive analysis and a robust set of tools like Perfetto, dumpsys, etc to analyze this problem and arrive at a sustainable solution. The team approached this challenge using two principles - parallelize work and be lazy.\n\nWith the help of Google's analysis, the team prioritized tasks -\n\n- Used systrace and perfetto to study the app flow, analyze pain points, validate improvements in app startup time.\n- Delayed initialization: Identified fragments/instances/classes initialization that could be delayed until the homepage is displayed -\n - Ads\n - Music Service (Foreground Service) and Player Resources (e.g. Exoplayer, cached player queue etc)\n - Player Fragment which is minimized at the time of launch.\n- On-demand initialization: of various libraries as and when the library is required (eg Facebook lib).\n- viewStubs: View Inflation and resource loading was heavy. The team flattened their layouts using viewStubs and converted the images to webP.\n- Worker thread: Some tasks which didn't require UI thread were moved to b/g threads to free up the UI thread.\n- Split Cache Data - Reading and parsing huge cached data from a file takes a lot of time. The team split it into critical (necessary for showing homepage) and non-critical data.\n- Async LayoutInflater: Some of the views required for homepage recyclerview were pre-inflated using Async LayoutInflater.\n\nTools Used - Perfetto, Systrace, Google play vitals, Android studio Profilers, Firebase performance SDK\n\nResults\n-------\n\nThe JioSaavn team released these changes over multiple versions of the app to maintain app stability. They achieved the following results -\n\n- 30% improvement in app startup time on all devices and 35 - 40% in low-mid end devices.\n- 5% improvement in Home Screen Viewers/ DAU, thus reducing the bounce rate.\n\nThis optimization exercise brought the whole team together. Detailed walkthroughs were done to make the team comfortable with the changes, and inculcate a performance-focused approach towards the app.\n\u003e \"JioSaavn aims to better the listening experience of our users who come from various regions \n\u003e\n\u003e and cities in India, and span across the spectrum\n\u003e in terms of affordability. Thus going past the mobile connectivity\n\u003e infrastructure of their region, and optimizing the user experience across the\n\u003e users' device capabilities is a constant challenge we work for.\n\u003e Thanks to Google's developer relations guidance, we were able to take a definitive step\n\u003e in this direction.\"\n\u003e\n\u003e **-- JioSaavn Product Team**"]]