ANR の削減により、OkCredit の販売者取引が平均 30% 増加
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
OkCredit はインドの何百万人もの店舗オーナーとその顧客向けのクレジット アカウント管理アプリです。月ごとの取引数が 1 億 4, 000 万件を超え、ダウンロード数が 5, 000 万件を超えるという状況で、OkCredit は昨年だけでもアプリに 500 億ドル相当の取引を記録しました。
OkCredit が運営している規模と、アカウント管理を同社のアプリに依存している何百万もの企業を考慮すると、使用しているデバイスに関係なく、すべてのユーザーにスムーズでシームレスなエクスペリエンスを提供することが OkCredit に欠かせません。
ユーザーは、最もパフォーマンスの高いアプリを好意的なレビューや高い評価で高く評価します。アプリの安定性やパフォーマンスの問題は、ユーザーの不満につながり、さらに悪い評価につながることも少なくありません。その結果、ANR(アプリケーション応答なし)は、ユーザーが満足して常に快適なユーザー エクスペリエンスを提供することを目的としているかどうかを追跡するための重要なパフォーマンス指標となっています。
OkCredit は ANR の削減やアプリの起動時間の改善など、Android Vitals の改善に投資した結果、特に(すでにリソースが限られている)ローエンド デバイスでは大きな利益を得ることができました。顧客維持率の向上に加え、アプリでの販売者の取引も改善されました。
課題
OkCredit の主要なセグメントの一つはローエンド デバイスのユーザーでした。このようなデバイスはリソースに限りがあるため、負荷の高いタスクの実行が簡単に、最適なユーザー エクスペリエンスとはなりません。たとえば、ANR の追跡と計測の追加は、メンテナンスの大きな課題でした。これらの問題に対処し、全体的なユーザー エクスペリエンスを向上させ、販売者の取引を増やすことを目標としていました。
取り組みの内容
OkCredit のようなアプリの ANR を減らして起動時間を短縮することで、顧客に満足してもらえるだけでなく、アプリでの販売者取引も増加しました。
ANR のデバッグで最も重要な手がかりは、ANR が発生したときにメインスレッドが何を行っていたのかを調べることです。OkCredit は Google からのフィードバックを参考にして、こうした ANR を特定するための構造化されたアプローチを作成しました。
- Android Vitals を使用してパフォーマンスをモニタリングし、Firebase Crashlytics のカスタム レポートを使用して ANR について学習
- サードパーティ ライブラリをバックグラウンド スレッドに移動することで、アプリ起動からのサードパーティ ライブラリの初期化を最適化
- Systrace や Profiler などのツールを使用して、ブロードキャスト レシーバと Service における ANR を特定しました。CI の Macrobenchmark は、コールド スタートアップのベンチマークにも役立ちました。
- メソッド プロファイラを使用することで、オブジェクトの読み込みが遅延していることが確認されました。
- perfetto を使用して、高インフレーション レイアウトを特定しました。
- 共有設定での ANR は、バックグラウンド スレッドですべての apply() を commit() に変更することで解決されました。
上記のタスクは、指標を比較したり、Systrace や CPU Profiler などのツールを使用して影響を検証したりして検証されました。
結果
OkCredit の開発チームは、指標とユーザー エクスペリエンスを改善するだけでなく、今後の開発プロセスの改善に役立つ分析情報も得ることができました。
- ローエンド デバイスの場合:
- ANR が 60% 減少
- ローエンド デバイスの 1 日目の顧客維持率は約 22% 向上
- 販売者あたりの平均取引額が 30% 増加
- Play ストアでのアプリの評価を 4.3 から 4.6 に改善
- コールド スタートアップ時間が約 70% 短縮
- どの画面でも最初のフレームをフル描画するためのユーザーのクリックが 60 % 改善
この演習によってチーム全体でベスト プラクティスが作成され、ユーザー エクスペリエンスの改善に注力することができました。チームは、システムについての理解を深め、意思決定を迅速化するために、開発中に Perfetto や CPU Profiler などのツールを使い始めました。
「ANR の削減に重点を置いたことで、快適な体験を提供することで他社との差別化につながりました。これにより、維持率が向上し、チャーンが減少しました。
さらに、チームの優れたエンジニアリングにより、このような手法は組織の文化に大きく影響します。このことから、インドの新興の SMB デジタル化業界において、チームとして、また会社がアプリのパフォーマンスに関する新たなベンチマークを設定していることを誇りに思います。」
– Gaurav Kunwar 氏(共同創設者兼 CPO - OkCredit)
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2022-04-13 UTC。
[[["わかりやすい","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"]],["最終更新日 2022-04-13 UTC。"],[],[],null,["# OkCredit’s average merchant transaction goes up by 30% after reducing ANR\n\nOkCredit is a credit account management app for millions of shop owners and their customers in India. With 140M transactions month over month, and 50M+ downloads, last year alone saw OkCredit recording $50 billion worth of transactions on the app.\n\nConsidering the scale that OkCredit operated in, and the millions of businesses that depend on its app for managing their accounts, it is imperative that OkCredit ensures a smooth and seamless experience for all its users, irrespective of the device they are using.\n\nUsers reward the best performing apps with positive reviews and high ratings. An app that has stability or performance issues often leads to frustration and even worse, bad ratings. This makes ANRs (Application Not Responding) an important performance metric to track if you're aiming to delight your users and give them a consistently good user experience.\n\nOkCredit's investments in improving Android Vitals, like reducing ANR and improving app startup time led them to reap dividends, especially on low-end devices (which are already resource limited). They saw both improvements in customer retention as well as merchant transactions on the app.\n\nThe Challenge\n-------------\n\nOne of the key segments for OkCredit were users on low-end devices. These devices are resource limited and running taxing tasks on them can easily create a sub-optimal user experience. For example, a major maintenance challenge was tracking and adding instrumentation for ANRs. The goal was to address these issues with the aim of improving the overall user experience and increasing merchant transactions.\n\nWhat did they do?\n-----------------\n\nReducing ANR and improving app startup times for an app like OkCredit meant happy customers and moreover an increase in merchant transactions on the app.\n\nThe most important clue in debugging an ANR is finding out what the main thread was doing when the ANR happened. Working with feedback from Google, OkCredit created a structured approach for identifying these ANRs.\n\n- Monitored performance using Android Vitals and used custom reporting on Firebase Crashlytics to learn about ANRs\n- Optimized initialization of third party libraries from App start, by moving these to a background thread\n- Used tools like Systrace and Profiler to identify ANRs in broadcast receivers and Services. Macrobenchmark on CI also helped benchmark cold startups.\n- Using method profiler, objects were identified to be loaded lazily.\n- Using perfetto, high inflation layouts were identified.\n- ANR in shared preferences were solved by changing all apply() to commit() in a background thread.\n\nThe above tasks were validated to confirm their impact by comparing metrics or using tools such as systrace, CPU profiler etc.\n\nThe Results\n-----------\n\nBeyond improving metrics and the user experience, the OkCredit development team gained insights that helped them improve their development process going forward. \n\n- On low-end devices -\n - Reduced ANR by 60%\n - Improved Day 1 customer retention of low-end devices by about 22%\n - The average transaction for each merchant increased by 30%\n- Improved app rating from 4.3 to 4.6 on the Play Store\n- Cold startup time improved by \\~70%\n- Saw 60 % improvement in user click to full draw of first frame on any screen\n\nThis exercise has brought the team together to create best practices and encouraged them to focus on improving the user experience. The team has started using tools like Perfetto and CPU profiler during development itself in order to improve their understanding of the system and make decisions faster.\n\u003e \"Focusing on reducing ANRs has helped us differentiate ourselves by offering a\n\u003e delightful experience. This has led to increased retention, and reduced churn.\n\u003e Additionally, due to the teams' engineering excellence, practices such as\n\u003e these have a profound influence on organization's culture. This makes us proud\n\u003e as a team, and company setting new benchmarks of app performance in the\n\u003e nascent Indian SMB digitisation industry.\"\n\u003e\n\u003e **-- Gaurav Kunwar (Cofounder \\& CPO - OkCredit)**"]]