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

Seeing 60 FPS while app is running on 144Hz #8

Closed
jenshor opened this issue Jun 22, 2022 · 6 comments
Closed

Seeing 60 FPS while app is running on 144Hz #8

jenshor opened this issue Jun 22, 2022 · 6 comments

Comments

@jenshor
Copy link

jenshor commented Jun 22, 2022

I'm running a MacOS app on a 144Hz screen in Profile Mode. While my profiler shows 144 FPS average, I only see 60 FPS within StatsFl.

Once the framerate drops to below 60 (due to heavy and unoptimised animations), i'm seeing values similar to the ones provided by the profiler.

image

@esDotDev
Copy link
Contributor

Did you try setting maxFps to 144?

@jenshor
Copy link
Author

jenshor commented Jun 22, 2022

Yes. I set maxFps to 144. I also debugged into the StatsFl widget and 144 was applied as well.

@jenshor
Copy link
Author

jenshor commented Jun 22, 2022

However, while debugging, I wasn't able to pinpoint the problem.

@jenshor
Copy link
Author

jenshor commented Jun 22, 2022

I just disconnected my external 144Hz display and used the Build-In ProMotion (variable refresh rate up to 120 Hz) display. While I cant force the display to run at 120 hz constantly, I was able to force 60 and 48 Hz. In both cases, the counter just showed stable 60 Hz. It might be that Flutter does not detect that my system is 120/144 Hz capable and just defaults to 60 Hz.

The profiler might be able to detect the system's capability, but i'm assuming that frame rate is just calculated based on frame time and then capped to the max capable framerate of the system.

Any thoughts/experience with this?
Since my animation runs at 60 FPS I really dont need to optimize further, but I think the topic is interesting anyways 😀

@jenshor
Copy link
Author

jenshor commented Jun 22, 2022

Actually, I think this is not a problem of this package. I see 144 Hz in Chrome, but only 60 on the MacOS desktop app. Therefore, I think the issue is related to flutter/flutter#49757.

@esDotDev
Copy link
Contributor

esDotDev commented Jun 22, 2022

Thanks! Ya this lib just counts milliseconds between ticks, it is not much smarter than that and knows nothing about device capabilities.

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

No branches or pull requests

2 participants