firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.65k stars 1.48k forks source link

Slow rendering is not reported correctly on tvOS #10220

Open mkj-is opened 2 years ago

mkj-is commented 2 years ago

Description

We received around 150x higher values for Slow rendering in our app on tvOS (~60 %) than iOS (<1 %). This led us to an investigation why this could be happening.

I am not sure what would be the best solution to improve this metric. I think the least what can be done is to mention this in the documentation.

Reproducing the issue

Set your TV to slow refresh rate and check slow rendering values.

Firebase SDK Version

9.4.1

Xcode Version

13.4.1

Installation Method

CocoaPods

Firebase Product(s)

Performance

Targeted Platforms

iOS, tvOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 2 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

morganchen12 commented 2 years ago

For tvOS, we can programmatically check the attached TV's refresh rate and update our definition of slow frames accordingly. For variable refresh rate displays like ProMotion this becomes much harder, Perf folks see this doc for more details.

jfcong commented 2 years ago

Thanks for raising this @mkj-is. The Perf SDK has the assumption about the device having a refresh rate of 60fps when calculating slow and frozen frames, and I will definitely be adding this to our documentation. I've also raised this with the eng team and we will see when we can prioritize looking into this and making the screen traces metrics more accurate for devices with different refresh rate. This might not be something we can easily change so we will have to investigate more, but it's definitely on our radar now!

mkj-is commented 2 years ago

Thanks for acknowledging this issue. I get why this might be hard to implement from your side, it would interfere with historic data when updating Firebase. But with more and more ProMotion devices the importance of this might be larger in the future.