Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android FPS Monitor shows UI frame rate for JS frame rate #50338

Open
mobinni opened this issue Mar 27, 2025 · 6 comments
Open

Android FPS Monitor shows UI frame rate for JS frame rate #50338

mobinni opened this issue Mar 27, 2025 · 6 comments

Comments

@mobinni
Copy link

mobinni commented Mar 27, 2025

Description

When opening the FPS monitor on Android the JS thread FPS and UI FPS are a copy of each other, which I believe means the JS FPS in the monitor is actually just a representation of the UI thread FPS?

Steps to reproduce

  1. Open an app in android debug mode
  2. Open the FPS monitor
  3. Values always align

React Native Version

0.77.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: macOS 14.7
  CPU: (12) arm64 Apple M3 Pro
  Memory: 164.69 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.13.0
    path: ~/.local/share/mise/installs/node/22/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.local/share/mise/installs/node/22/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/mbinni/.local/share/mise/installs/ruby/3.2/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12550806
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.2
    path: /Users/mbinni/.local/share/mise/installs/java/17/bin/javac
  Ruby:
    version: 3.2.5
    path: /Users/mbinni/.local/share/mise/installs/ruby/3.2/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

N/A

Reproducer

https://snack.expo.dev/@mobinni/thankful-red-truffle

Screenshots and Videos

Screen.Recording.2025-03-27.at.3.20.24.PM.mov

The other FPS monitor you see is the PerformanceMonitor from reanimated: https://github.com/software-mansion/react-native-reanimated/blob/main/packages/react-native-reanimated/src/component/PerformanceMonitor.tsx

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.77.2. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added the Platform: Android Android applications. label Mar 27, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cipolleschi
Copy link
Contributor

Thanks for the issue @mobinni.
Is this happening for Android only or also for iOS?

We will look into it soon!

@mobinni
Copy link
Author

mobinni commented Mar 28, 2025

@cipolleschi it's only android as far as I can tell! iOS is giving me the right numbers (in both old and new arch). I'm also not sure if it's a Fabric only issue in Android, I didn't run it in old arch to confirm whether it affects both or not.

@huntie huntie self-assigned this Mar 31, 2025
@huntie
Copy link
Member

huntie commented Mar 31, 2025

Hi @mobinni, we've acknowledged this task and will take a look.

Worth noting that we don't recommend the in-app Performance Monitor for performance measurements as it's never been that reliable (including "JS FPS" itself being an invented concept).

You should be able to determine the UI frame rate more accurately using the first party tooling from Android Studio and Xcode.

@mobinni
Copy link
Author

mobinni commented Mar 31, 2025

@huntie Appreciate the context — totally agree this isn’t a replacement for proper instrumentation and more rigorous tooling, and that JS FPS is more of a directional indicator than a precise metric. Still, it’s a valuable heuristic for catching performance regressions early, especially during iterative dev work. Even if it’s not perfect, having it behave consistently is key to building confidence and helping teams know when to dig deeper with more advanced profiling tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants