Performance APIs

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.

Concepts and usage

The Performance API provides many built-in metrics to describe key moments at various stages of page rendering, helping developers improve page performance. It assists developers in ensuring quick response during phases such as component rendering and user interaction. To use them, one needs to understand the following core concepts:

  • Entry Object

    lynx.performance serves as the entry point to the performance monitoring system.

  • 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.

Guides

The following guides help you to understand key concepts of the Performance API and provide an overview about its abilities:

  • Evaluating Performance: This is the core guide for evaluating page performance. The article highlights crucial performance metrics to focus on and demonstrates their application in typical scenarios.
  • Timing Flag: Timing Flags can help you track the performance of important data updates. This article explains how to use __lynx_timing_flag to monitor the Lynx Pipeline.
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.