Startup Performance Analysis

Startup performance analysis observes the time from when the miniapp is opened to when the first screen finishes rendering. It is used to diagnose issues like "slow to open" or "long blank screen on first load".

How to Enable

Before starting analysis, access the debugging tool entry.

  1. Open the Ray miniapp page on a real device.
  2. Access the debugging tool:
    • iOS: Tap the ... button in the top-right corner, then tap Debugging Tools in the bottom sheet.
    • Android: Long-press the X button in the top-right corner, the App basic info panel will appear, then tap Open Debug at the bottom.
  1. Tap Open Performance Tools in the debugging tool menu.
  2. Re-enter or re-trigger the miniapp startup flow and observe startup-related metrics.

Applicable Scenarios

  • The page is noticeably slow on first open
  • Startup time has increased after a version update
  • First screen content appears too late
  • Need to compare startup time before and after optimization

Key Metrics

Miniapp Metrics

MetricDescriptionInvestigation ThresholdNotes
Startup timeTime from tapping the miniapp to page render complete> 1500msFirst open usually includes download time
Download timeTime to download the miniapp package> 1000msOnly triggered when there is no cache
Preparation timeTime from tapping the miniapp to JS code starting injection> 500msReflects runtime initialization speed
Page render timeDuration of miniapp page rendering> 500msReflects page complexity and first-screen rendering pressure
Frame rateReal-time frame rate of the current page< 30 FPSHigher values mean smoother pages
Average frame rateAverage frame rate of the current page< 50 FPSReflects overall smoothness level

The investigation thresholds above are industry-standard reference values. Actual standards are subject to business acceptance requirements.

App Metrics

MetricDescription
CPUCPU usage of the current App
MemoryMemory occupied by the current App
Startup timeTime from tapping App launch to ready state

How to Interpret Results

  • High startup time: Check the main package size and whether first-screen dependencies are too heavy.
  • High download time: Check package size and whether images or static assets are too large.
  • High preparation time: Usually indicates slow runtime initialization; check for excessive synchronous logic blocking the injection flow.
  • High page render time: Usually indicates overly complex first-screen content or async operations blocking rendering.

If you have identified the issue, refer to the following documents: