The Performance API is a set of tools for precisely measuring the performance of Lynx applications, helping developers pinpoint bottlenecks in critical phases such as loading, rendering, and user interactions.
Lynx applications aim to maintain fast response times during key stages such as page loading, element rendering, and user interactions. To achieve this, the Performance API provides many built-in metrics to describe the key moments during page rendering, assisting developers in enhancing page performance. Understanding the following core concepts is helpful for using these APIs:
Entry Object
lynx.performance
serves as the entry point to the performance monitoring system. This object can be used to create
performance observers. It is only accessible in in the background thread runtime.
Performance Observer
The PerformanceObserver
interface is used to listen for various types of performance entries.
Performance Events
Performance events are represented by PerformanceEntry
. PerformanceEntry
includes basic information such as
the event name name
and event type entryType
. All performance events (e.g., application initialization time, page load time) inherit from the PerformanceEntry
interface and extend it with additional properties.
The following guides help you to understand key concepts of the Performance API and provide an overview about its abilities: