Developing Mobile Apps for
Performance
Swapnil Patel, Director of Software Engineering (Mobile),
Verizon Media
February 21st, 2019
2
Users are complaining...but I did my job!
● I’m losing my DAUs but the app works perfectly.
● Performance tests passed 100% but user feedback is negative.
● Are we measuring performance KPIs correctly?
3
Product teams...
4
Security Engineers…
5
What matters to users?
6
● Latency (User perceived)
● Stability
● Battery
App Performance
7
User perceived latency: Cold app launch
8
Why is it taking so
long to launch
content?
9
Cold app launch...keep it under 2000ms!
< 1500 ms I love this app!
> 1500 ms && < 5000 ms It should work!
> 5000 ms I’m done with this app!
Users may stop using your app
without sharing any negative
feedback
Measuring App Launch Performance
12
Measuring app performance isn’t easy
● Hard to test and simulate real world scenarios
○ Controlled environment
○ High-end devices
○ Test hardware on low latency networks - test machines and
devices
○ Did you simulate 3G/4G network and real-world conditions?
● Needs continuous auditing
○ Different network bandwidth levels
○ Device capabilities
○ Regions or geo-locations
13
App performance KPI: Cold App
Launch (iOS)
Credit: Devrim Tufan (Verizon Media), Scott Tury (Verizon Media)
14
App performance KPI: Cold App
Launch (Android)
We want to report cold_start_display = Δdisplay with breakdowns
cpuElapsedTime appCreateDelta appCreateActCreateDelta actCreateStartDelta actStartResumeDelta actResumeDisplayDelta
Most apps report cold_start_* = Δd1 + Δd2 + Δd3
Credit: Devrim Tufan (Verizon Media), Scott Tury (Verizon Media)
Fine-tuning App Launch Performance
16
What’s one thing I wish I knew before?
Fetch content in the
user’s viewpoint with a
single end point.
17
What’s one thing I wish I knew before?
Fetch content in the
user’s viewpoint with a
single end point.
Reduce the number of
network calls to load
your home screen
faster.
18
○ App cache
○ Background prefetch
○ Silent notifications
○ Network layer optimizations
○ User feedback (spinners,
animations…)
Nice to have…
Fetch content in the user’s viewpoint
with a single end-point, single
network call.
20
Thanks!
Reach out
Swapnil Patel
Director of Software Engineering, Verizon Media
swapatel@verizonmedia.com
@patelsince1981
LinkedIn

Developing Mobile Apps for Performance - Swapnil Patel, Verizon Media

  • 1.
    Developing Mobile Appsfor Performance Swapnil Patel, Director of Software Engineering (Mobile), Verizon Media February 21st, 2019
  • 2.
    2 Users are complaining...butI did my job! ● I’m losing my DAUs but the app works perfectly. ● Performance tests passed 100% but user feedback is negative. ● Are we measuring performance KPIs correctly?
  • 3.
  • 4.
  • 5.
  • 6.
    6 ● Latency (Userperceived) ● Stability ● Battery App Performance
  • 7.
  • 8.
    8 Why is ittaking so long to launch content?
  • 9.
    9 Cold app launch...keepit under 2000ms! < 1500 ms I love this app! > 1500 ms && < 5000 ms It should work! > 5000 ms I’m done with this app!
  • 10.
    Users may stopusing your app without sharing any negative feedback
  • 11.
  • 12.
    12 Measuring app performanceisn’t easy ● Hard to test and simulate real world scenarios ○ Controlled environment ○ High-end devices ○ Test hardware on low latency networks - test machines and devices ○ Did you simulate 3G/4G network and real-world conditions? ● Needs continuous auditing ○ Different network bandwidth levels ○ Device capabilities ○ Regions or geo-locations
  • 13.
    13 App performance KPI:Cold App Launch (iOS) Credit: Devrim Tufan (Verizon Media), Scott Tury (Verizon Media)
  • 14.
    14 App performance KPI:Cold App Launch (Android) We want to report cold_start_display = Δdisplay with breakdowns cpuElapsedTime appCreateDelta appCreateActCreateDelta actCreateStartDelta actStartResumeDelta actResumeDisplayDelta Most apps report cold_start_* = Δd1 + Δd2 + Δd3 Credit: Devrim Tufan (Verizon Media), Scott Tury (Verizon Media)
  • 15.
  • 16.
    16 What’s one thingI wish I knew before? Fetch content in the user’s viewpoint with a single end point.
  • 17.
    17 What’s one thingI wish I knew before? Fetch content in the user’s viewpoint with a single end point. Reduce the number of network calls to load your home screen faster.
  • 18.
    18 ○ App cache ○Background prefetch ○ Silent notifications ○ Network layer optimizations ○ User feedback (spinners, animations…) Nice to have…
  • 19.
    Fetch content inthe user’s viewpoint with a single end-point, single network call.
  • 20.
  • 21.
    Reach out Swapnil Patel Directorof Software Engineering, Verizon Media swapatel@verizonmedia.com @patelsince1981 LinkedIn