Why Apps should implement Splash screen and ReportFullyDrawn() APIs for App performance

Performance is an essential area of focus when building applications for Vega devices and it’s critical to understand the key terms and KPIs used to measure you app loading times. Monitoring performance through the entire development process helps avoid significant refactoring steps at later stages after the app is functionally complete. The following guide outlines the performance requirements and how to measure app latency KPIs (First Frame and Ready To Use) prior to app reviews.

Measuring app latency (TTFF)

Time To First Frame (TTFF) is time taken by your app to render its first visual frame on screen after launching action. During this period, your app may draw its background, initiate navigation, load local assets, and render placeholders for the content loaded either locally or fetched from remote endpoint.

This KPI has significant impact on the customer experience in your app since it reveals the first view of the app as it loads on the device - affecting the perception of performance/speed for the end user. Consider implementing a splash screen in order to load values & assets while the app is loading in order to improve the App launch experience for customers.
In Vega this KPI is measured by calculating the time it takes after the main component defined for your application in the manifest.toml file is launched to the time when it renders first frame on screen.

Vega Splash Screen Usage

splash-screen-example

For improving the app launch experience, Vega SDK provides splash screen functionality through the “SplashScreenManager” component. This enables you to build static or animated graphics that can be visible on screen until you determine when to progress to the next screen of your app. The required SplashScreen assets are bundled up during packaging of the app then used by the Vega device during app launch.

:light_bulb: Make sure to read through the docs on how to integrate Splash screen assets and the SplashScreenManager.

The main advantage of using SplashScreen Manager component is that it removes the complexity in your application startup to take care of rendering the splash screen while the app goes through its startup tasks. Vega OS will render the splash screen as configured through steps above and your application then would only need to handle removing of splash screen when the app is ready to put its first frame on screen post loading tasks. This mechanism will ensure that the app is always able to meet the TTFF KPI thresholds.

Determine when the app is ready to use (RTU) or TTFD

Ready to use (RTU) (or Time To Fully Drawn) KPI represents the time from when the app starts to when it is fully loaded and usable by a customer via a remote control or related device input such as voice. This is another KPI which has huge significance in providing better app launch customer experience as well as increase engagement with the app. Typically this KPI is measured manually by checking the time after app launch until the app is able to respond to user interaction and this method is prone to errors. measuring this KPI deterministically makes this KPI more deterministic and also provides greater chance of automating the testing for the same.

For this purpose, Vega SDK provides useReportFullyDrawn() API for developers to notify by putting out a log trace once the app has finished loading all components of the main screen on launch. When the app integrates this API, you can measure the RTU/TTFD KPI using our performance measurement tools which can give you the exact measurements and helps in improving the app startup implementation.

useReportFullyDrawn() API is available through the @amzn/kepler-performance-api NPM package. To accurately report fully drawn in your application make sure to call it after any asynchronous loading and processing required is completed and the app is fully functional. It will inject a marker trace in the device log which can be used for calculating this KPI.

:light_bulb:Read the docs for useReportFullyDrawn() to learn more.

This mechanism is also used by Amazon to measure TTFD performance KPI in our performance certification testing. VegaStudio includes command line tool as well as gui based mechanisms to measure TTFD KPI. This can be used to keep track of the impact on the TTFD KPI while app is being developed as well.

:light_bulb: Read the docs on Measuring App performance KPIs to learn more