-
Notifications
You must be signed in to change notification settings - Fork 927
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
Expose CFRunLoopTimerCreate interval as setting for iOS #4074
Comments
Thanks for the suggestion! The timer is intended to be internal, and it's "just" a bug that it's triggering so frequently, so I'm not gonna expose a knob for tuning this (instead, we should fix the underlying bug). |
The bug's been in limbo for some time -- Is there anything I can do to support getting the fix merged in? |
I guess test #3906, but really what's needed is understanding of why the bug triggers in the first place |
Hi @madsmtm . So the only way to make it work properly today is to use a fork with different timer interval? |
Until someone does the work to fix the bug properly, then yes. Which, realistically, will have to be me, but could technically be someone else. |
My reasoning why I don't just merge #3906 and call it good is that I fear that it might break something else, and because I feel that's just not the way to do software development. But writing that down, I guess iOS is very broken right now anyhow, so I retract my previous strong wording, I'm not that adamant about it. I'm still against changing a timer interval (that just masks the problem), but if you've really tested and think that my PR fixes it, then we can merge it without understanding of why it fixes it. |
@Braymatter and whoever else stumbles on this, there is capable workarounds to this timer: configure WinitSettings in Bevy. there is a post about this too. |
@madsmtm I tested patch from #3906 in my project and it definitely fixed my issue:
That is a good intention and I would agree with you in any other situation. But |
@VladasZ is this using winit in the context of a bevy app? |
@extrawurst no it is my own project. You can see all the code in my issue: #3816 . The only dependency is |
@extrawurst I appreciate you linking your blog post, we've also used WinitSettings successfully in our project. I think this Timer issue is maybe slightly different though. I still see differences in CPU profiling when I modify the timer frequency. @madsmtm I can try and pull your fix in and see if it causes any issues in our bevy app. |
Description
Expose the EventLoopWaker interval as a configurable setting for the ios platform:
IOS Bevy apps are using a lot of CPU resources by default because this interval is so short. We've had positive impact on CPU/Energy use by lowering it to around 200hz instead of 1Mhz in a private fork. Ideally this setting would be exposed to client applications as realtime apps may have different polling requirements than input reactive apps etc.
Related to #3906, #3816
Relevant platforms
iOS
The text was updated successfully, but these errors were encountered: