TikTok 利用 Android 工具优化用户体验
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
TikTok 是全球社区驱动的娱乐平台,吸引来自世界各地的超过 10 亿用户一起探索、创作和分享自己喜爱的内容。
多样化的用户群需要不同的网络条件和设备规格,无论用户使用何种设备,他们都希望获得流畅、响应迅速的应用体验。
如果 TikTok 加载缓慢或播放卡住,用户会感到沮丧并完全放弃使用该应用。为避免出现这种情况,TikTok 会依赖数据监控、类似应用对比和用户调查问卷来跟踪应用的整体表现。该团队还采用了 Systrace 和 Simpleperf 等分析工具,以减少界面卡顿、播放延迟和网络问题。尽管这一过程取得了良好效果,但工程团队希望更进一步,发现影响效果的根本因素,并使用可量化的效果指标来制定优化计划。
他们是如何做到的
TikTok 的目标是实现更快的启动速度,并确保提供更顺畅的播放和用户体验。为了实现这些目标,该团队使用 Android 开发工具找出有待改进的方面并加以改进。
为了缩短 TikTok 的启动时间,该团队根据 Android Jetpack 的 App Startup 库对启动框架进行了重构。
为确保界面更加流畅,该团队使用 Andriod Studio 中的布局检查器简化了 View 层次结构,并移除了过多的内容。TikTok 制定了一项策略,将复杂的任务分布到不同的帧中,以确保在应用运行时保持一致的帧速率。
视频播放是 TikTok 应用体验的核心。该团队重复使用了播放器实例,并利用预加载/预呈现功能,让用户可通过观看一个视频后切换到另一个视频,实现快速无缝的切换。
成果
一年多来,TikTok 团队一直在使用 Android 性能工具来跟踪、量化和优化其所有性能因素。该应用的许多性能指标都得到了显著提升,包括:
- 应用启动时间缩短了 45%
- 用户体验中的卡顿、丢帧或冻结的帧减少 49%;现在,播放视频时的第一帧出现速度加快 41%,视频延迟缩短了 27%
随着用户体验的改善,越来越多的用户开始使用 TikTok。会话时长延长了,随着每位用户在 30 天内的活跃天数增加 1%,用户在应用中保持活跃的可能性会提高 1%。用户调查和应用评分也表明整体用户满意度显著提高。
通过将重心转向实现 Android 应用卓越奖,并以最新平台版本 Android 13 为目标平台,该团队不断改善用户体验,吸引更多用户分享和使用内容。
目前全球使用的大屏 Android 设备已超过 2.5 亿台,该团队还在专注于提高大屏设备的普及率,在不久的将来为用户提供沉浸感更强的 TikTok 体验。
开始使用
如需详细了解 TikTok 团队如何使用 Android 工具根据性能数据优化其应用,以及提升整体应用体验,请阅读我们面向开发者的技术案例研究。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# TikTok Optimizes User Experience with Android Tools\n\n[TikTok](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically), the world's community-driven entertainment destination, brings over 1 billion people together from around the world to discover, create and share content they love.\n\nA diverse user base requires various network conditions and device specifications, and all users want a seamless, responsive app experience regardless of which device they use.\n\nIf TikTok is slow to load, or playbacks get stuck, users will get frustrated and abandon the app altogether. To avoid this, TikTok relies on data monitoring, peer app comparison and user surveys to track the overall app performance. The team also adopted profiling tools like [Systrace](https://developer.android.com/topic/performance/tracing) and [Simpleperf](https://developer.android.com/ndk/guides/simpleperf), to reduce UI jank, playback lags and network issues. While this has been working well, the engineering team was looking to take it one step further and uncover the underlying factors affecting the performance and develop an optimization plan with quantifiable performance indicators.\n\nHow they did it\n---------------\n\nTikTok's goal was to achieve a faster startup speed and ensure a more seamless playback and user experience. To meet these goals, the team used Android development tools to find areas of improvement and refine them.\n\nTo reduce TikTok's startup time, the team refactored the startup framework based on Android [Jetpack's App Startup library](https://developer.android.com/topic/libraries/app-startup).\n\nTo ensure a smoother user interface, the team used the [Layout Inspector](https://developer.android.com/studio/debug/layout-inspector) in [Andriod Studio](https://developer.android.com/studio) to simplify their View hierarchy and remove excessive content. TikTok developed a strategy to spread complex tasks across different frames to ensure consistent frame rates while the app is running.\n\nVideo playback is at the core of TikTok's app experience. The team reused player instances and utilized preloading/pre-rendering to create quick and seamless transitions from watching one video then switching to another.\n\nResults\n-------\n\nThe TikTok team has been using [Android performance tools](https://developer.android.com/topic/performance) for over a year to track, quantify, and optimize all of their performance factors. Many of the app's performance indicators have seen significant improvement, including:\n\n- The app startup time was reduced by 45%\n- A 49% decrease in jank, dropped or frozen frames in user experience - the first frame when playing a video now appears 41% faster and video lag has been reduced by 27%\n\nWith an improved user experience, more people are now using TikTok. Session duration has gone up and users are more likely to stay active in the app with the active days per user in 30 days increasing by 1%. User surveys and app ratings have also pointed to a significant increase in overall user satisfaction.\n\nBy shifting their focus on achieving [Android App Excellence](https://developer.android.com/quality) and targeting the latest platform release, Android 13, the team continuously improves the user experience, leading more people to share and consume content.\n\nWith more than 250 million large screen Android devices currently in use globally, the team is also focusing on growing their large-screen device adoption to bring a more immersive TikTok experience for users in the near future.\n\nGet Started\n-----------\n\nTo learn more about how the TikTok team optimized their app based on performance data and improved the overall app experience using Android tools, please read our [technical case study](https://android-developers.googleblog.com/2022/08/precise-improvements-how-tiktok-enhanced-its-social-experience-on-android.html) for developers."]]