# Screen response time. A critical metric for user experience

DevFeed: [Screen response time. A critical metric for user experience](<https://devfeed.tech/articles/screen-response-time-a-critical-metric-for-user-experience-37406.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/screen-response-time-a-critical-metric-for-user-experience-fc2be922859f?source=rss----40ea5327aac7---4>)

Author: Anjal Saneen

Published: 2022-06-27T06:10:37Z

Content type: tutorial

Language: en

Sources: [OkCredit - Medium](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [User Experience](<https://devfeed.tech/topics/user-experience.md>), [Android](<https://devfeed.tech/topics/android.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Interaction to Next Paint](<https://devfeed.tech/topics/interaction-to-next-paint.md>), [XML](<https://devfeed.tech/topics/xml.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [IO](<https://devfeed.tech/topics/io.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [interaction-to-next-paint](<https://devfeed.tech/tags/interaction-to-next-paint.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [okcredit](<https://devfeed.tech/tags/okcredit.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [performance](<https://devfeed.tech/tags/performance.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

## AI overview

This article explains screen response time as a responsiveness metric for Android applications. It describes how Android screens load, including XML layout parsing, I/O, view-tree population, and reflection, and contrasts Android vitals with web responsiveness metrics such as Interaction to Next Paint.

## Source excerpt

A high-quality user experience is always a top priority at OkCredit. We aim to make the mobile app as fast as possible. To better understand performance impact, we measure various L1 and L2 metrics. Among them, a key metric is screen response time. The time it takes the user to reach the first frame of the screen after clicking for opening a screen. Screen response time is a core web metric for web pages. In addition, Google recently introduced a new metric for assessing full-page responsiveness on the web called Interaction to Next Paint. Android vitals are far behind in terms of measuring responsiveness metrics compared to the web. You can watch the state of responsiveness on the web here. Playstore vitals measure frozen frames and slow frames, but they don't tell the whole story about the responsiveness of the app. In order for your app to be responsive, you must derive multiple metrics yourself. We share our learnings and findings on-screen response time in this blog post. How the screens loads Let me explain briefly how a screen loads on Android before we move on to the metric. For optimal screen load, it's important that you understand all the operations that occur there. Please keep in mind the term Screen in Android terms as referring to a fragment or activity. We demonstrate the XML and jetpack compose individually below. XML We must first understand the principle of XML layout loading, If you dig deep into the Android source code of Activity.setContentView, each layout must go through inflation before it can pass the measure and be drawn. XML Layout load to draw Phases 1. Load and parse the XML file loadXmlResourceParser is the method responsible for loading an XML file. We wouldn't need to go into the implementation details of this method, we just need to know that it reads the XML file we wrote into memory, and performs some data parsing and encapsulation. Therefore, this is a method that requires I/O. As we know, I/O operations are typically more comput