Empty game (no logic) has 50% CPU usage and low FPS (40+ instead of 60) on iOS
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
Tested on both 0.14.2
## \[Optional\] Relevant system information
Tested on
* iPhone 16 Simulator
* iPhone 13
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
```ignore
AdapterInfo { name: "Apple A15 GPU", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
```
## What you did
I setup a bare minimum project to demonstrate the issue https://github.com/80gen/bevy_ios_bug/tree/cpu_high
## What went wrong
The game logic doesn't have anything, not even a camera setup, see https://github.com/80gen/bevy_ios_bug/blob/cpu_high/crates/game/src/lib.rs
When running the game on desktop (in my test it's Macbook Pro M1), it looks fine, with CPU usage at 10%. No error log.
But when the game run in either iOS Simulator or physical phone, the CPU usage stay above 50% and FPS average at 40 (should be 60).
Here is a screenshot from the XCode debugger

The XCode terminal is showing the following log
```
AdapterInfo { name: "Apple iOS simulator GPU", vendor: 0, device: 0, device_type: DiscreteGpu, driver: "", driver_info: "", backend: Metal }
AddInstanceForFactory: No factory registered for id F8BB1C28-BAE8-11D6-9C31-00039315CD46
Failed to start Gilrs. Gilrs does not support current platform.
processing non `RedrawRequested` event after the main event loop: AboutToWait
Creating new window "App" (0v1#4294967296)
`WindowAttributes::min_inner_size` is ignored on iOS
`Window::theme` is ignored on iOS
processing non-`RedrawRequested` event after the main event loop: WindowEvent {
window_id: WindowId {
window: 0x0000000105a9fd30,
},
event: Focused(
true,
),
}
processing non-`RedrawRequested` event after the main event loop: WindowEvent {
window_id: WindowId {
window: 0x0000000105a9fd30,
},
event: Resized(
PhysicalSize {
width: 3840,
height: 2160,
},
),
}
processing `RedrawRequested` during the main event loop
processing non `RedrawRequested` event after the main event loop: AboutToWait
"finished frame" tracy.frame_mark=true
processing `RedrawRequested` during the main event loop
processing non `RedrawRequested` event after the main event loop: AboutToWait
"finished frame" tracy.frame_mark=true
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
processing non `RedrawRequested` event after the main event loop: AboutToWait
"finished frame" tracy.frame_mark=true
```
And this line get repeated infinitely
```
[2m2024-12-09T23:09:26.510999Z[0m [33m WARN[0m [2mwinit::platform_impl::ios::app_state[0m[2m:[0m processing non `RedrawRequested` event after the main event loop: AboutToWait
[2m2024-12-09T23:09:26.513511Z[0m [33m WARN[0m [2mwinit::platform_impl::ios::app_state[0m[2m:[0m processing non `RedrawRequested` event after the main event loop: AboutToWait
```
Contributor guide
Assessment
This issue has not been assessed yet.