-
Notifications
You must be signed in to change notification settings - Fork 920
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
iOS. High CPU usage when application does nothing. #3816
Comments
src/platform_impl/ios/app_state.rs -> new function in EventLoopWaker impl block when i changed interval time param that repeated too often, cpu usage down to zero percent but i dont know the function and side effect test code is same your |
@lsy969999 |
@PWhiddy |
Thanks. I have built the bevy iOS example and it works fine for me, but the bevy codebase is complicated enough that it seemed like non-trivial work to extract that sample to a standalone minimal example. Are there any projects that use winit on iOS besides bevy? |
Sorry, I learned about winit through Bevy, so I don't know about other examples using winit... |
I have been using egui though I'm not sure if its meant to support iOS out of the box. Currently investigating this repo which uses a forked egui: |
Indeed the problem here seems to be our |
Description
I noticed that my iPhone gets really hot when I run my projects. While trying to debug this issue I stripped all my code and only
winit
code remained but the phone was still hot.I see that Xcode shows constant CPU load:
The same project has 0 CPU load on Android:
On Windows:
On Linux:
And on macOS:
What may cause the issue?
Minimal example to reproduce:
Rust code:
main.m in Xcode project:
Device and iOS version
iPhone 13 Pro running iOS 17.5.1,
iPhone 5s running iOS 12.5.7,
iPhone 15 Simulator running iOS 17.4
Winit version
0.30.1
The text was updated successfully, but these errors were encountered: