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

clarifications for reported is_slow_rendered view parameter for 120fps capable devices #545

Open
AleCatSS opened this issue Oct 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@AleCatSS
Copy link

Hello,
Checking our RUM Performance vitals in the DataDog dashboard we noticed instances of views marked as is_slow_rendered=true. I was not able to find much documentation on this metric other then this but it looks like it is strictly related to the refresh rate (fps) of the application.

By doing a deeper analysis we noticed that 96% of is_slow_rendered are coming from high end device in particular iPhone PROs (13, 14, 15) which we expect to perform better than the rest.

In the official docs linked above there is a note saying:
' Refresh rates are normalized on a range of zero to 60fps. For example, if your application runs at 100fps on a device capable of rendering 120fps, Datadog reports 50fps in Mobile Vitals.'

Since react native JS thread refresh rate (which seems to be used to calculate is_slow_rendered) runs at max 60fps, on 120fps capable devices the normalized refresh rate would be 30 fps labelling views as a is_slow_rendered=true even though they are rendered at the max possible speed.

Can you please confirm if the above is correct? If yes, is there any configuration we can use to avoid this situation?

Thank you!

Steps to reproduce the issue:

  1. use a RN application on a iPhone device supporting 120fps;
  2. check is_slow_rendered=true labelled views under DD RUM section on DD Dashboard

Describe what you expected:

Confirmation of what reported above and if possible a way to avoid views labelled is_slow_rendered=true when they are rendering at 60fps.

Additional context

  • Version of the SDK:
    @datadog/mobile-react-native": "1.8.2"
  • Version of React Native:
    "react-native": "0.72.6",
  • package.json
  • Podfile and Podfile.lock
  • android/build.gradle and android/app/build.gradle
@AleCatSS AleCatSS added the bug Something isn't working label Oct 26, 2023
@louiszawadzki
Copy link
Contributor

Hi @AleCatSS, thanks for reaching out!

There are a few interesting questions in your issue, I'll try to answer them one by one.

How is is_slow_rendered computed?

Views are tagged as "slow rendered" directly in Native SDKs (it's not backend processing). You can see in the code for the iOS SDK that we compare the mean value of the refresh rate to a threshold (55fps), and mark the RUM View as "slow rendered" if it is below.

One important thing here is that the refresh rate used for comparison is the native main thread. So indeed it can be possible to have some RUM Views marked as slow rendered even though the native frame rate was above 60fps.

Could you look at the value for the "Refresh Rate" for your "slow rendered" RUM Views and report if you see any value above 55fps?
Screenshot 2023-10-27 at 10 40 00

Do we normalize JS thread frame rate?

We actually don't normalize the JS thread frame rate, it's always going to be 60fps max.
This is an error in our docs, I'll fix it very soon.

Further action

However, this does not explain why most of your "slow rendered" views happen on high end devices.
Could you compare the % of slow rendered views by device model to see if that number is especially higher for these devices or if this follows the customer base of your application?

For further action you would need to reach out to our support team so we can better troubleshoot your usage.

Let me know if anything is unclear and if I missed any question of yours.

@AleCatSS
Copy link
Author

Thank you @louiszawadzki for your thorough answer.

So if I understand correctly is_low_rendered is based on the native main thread which is NOT capped to 60fps and can reach 120fps on capable device hence if a device is 120fps capable and the main thread refresh rate is 120fps we should see a normalized refresh rate of 60fps and is_low_rendered=false also for high end devices.

Regarding your questions:

I checked the 'refresh_rate_average', it is < 55 (p95 30fps) for all our View tagged as is_low_rendered=true.
I compared the % of slow renders by devices: ~90% of slow renders is reported on high end devices; these devices combined represent the ~49% of our customer base so slow renders are much more prominent on them.

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants