# FPS panel

Base library 2.22.1 Start support, low version does not take effect.

To allow developers to debug the interactive performance of the rendering layer, the Mini Program base library provides the option to turn on FPS Panel, developers can see the render layer frame rate in real time.

# Enable mode

in app.json Is configured as follows, it can be enabled in the Mini Program FPS Display the current real-time frame rate and the frame rate fluctuation range within the current time window.

{
  "debugOptions": {
    "enableFPSPanel": true
  }
}

Please be careful not to bring this configuration item to the official version.

# Instructions

  • FPS The panel is accessed through the webview of requestAnimationFrame Callback, using the canvas Drawn, there may be some additional performance overhead in itself, but in general it can be ignored
  • FPS Panel can be dragged anywhere on the screen
  • When same layer rendering is not enabled, FPS Panels may be obscured by native components.