For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/rspeedy/runtime-profiling.md.
Rspeedy logo
Rspeedy
  • English
  • Runtime Profiling

    Profiling Lynx

    Following the instruction of Record Trace to profiling Lynx.

    Profiling Framework

    You can analyze framework performance in two ways: via build configuration and using the JS Profile.

    Enabling via Build Configuration

    We provide the builtin trace points in frameworks like ReactLynx (Components' render and diff).

    react profile

    • In development(rspeedy dev): ReactLynx-related trace points are added by default.
    • In production(rspeedy build): ReactLynx-related trace points are removed by default.

    These tracing points show how components are rendered and diffed.

    Run profiling in production

    The trace points can be enabled by setting the performance.profile to true when build.

    import { defineConfig } from '@lynx-js/rspeedy';
    
    export default defineConfig({
      performance: {
        profile: true,
      },
    });
    Tip

    You may use rspeedy preview to preview the output locally.

    This is useful when trying to optimize the performance of the application.

    Warning

    Do NOT deploy the output with performance.profile: true. They are not for production.

    Disable profiling in development

    The trace points can be disabled by setting the performance.profile to false when dev.

    import { defineConfig } from '@lynx-js/rspeedy';
    
    export default defineConfig({
      performance: {
        profile: false,
      },
    });

    Dynamic Sampling with JS Profile

    Use the JS Profile tool to collect call stack data at runtime without modifying the build configuration.

    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.