bevyengine / bevyengine/bevy

iOS mobile windowing-related performance regression and log spam

Open
#16,541 10 comments 2 reactions 0 assignees View on GitHub
A-Rendering A-Windowing C-Bug C-Performance O-iOS S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

3d72e08

## \[Optional\] Relevant system information

* cargo 1.82.0 (8f40fc59f 2024-08-21)
* xcode 16.1 (16B40)

## What you did

Just running the `bevy_mobile_example.xcodeproj`

## What went wrong

Console spamming of:

```
Monitor removed 14v3908#16784732192782
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 4v3083#13241384173572
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 14v3909#16789027160078
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 4v3084#13245679140868
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 14v3910#16793322127374
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 4v3085#13249974108164
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 14v3911#16797617094670
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 4v3086#13254269075460
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 14v3912#16801912061966
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 4v3087#13258564042756
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 14v3913#16806207029262
processing non `RedrawRequested` event after the main event loop: AboutToWait
Monitor removed 4v3088#13262859010052
```

Otherwise visually the example seems to run fine in the simulator.

here is the log of the same example on bevy 14.2: https://gist.github.com/extrawurst/7cbbb5b1918b5876a93705b92d65e196

here is the entire log of the above example in 3d72e08:
https://gist.github.com/extrawurst/b91117297242d412091862db171e29ab

If you compare this to the 14.2 behaviour there are a few things very different:
1. we don't have timestamps anymore
2. instead of just the old friend `processing non `RedrawRequested` event after the main event loop: AboutToWait` we now seem to get this second log every frame: `Monitor removed 4v3088#13262859010052`
3. the startup produces an absolutely massive amount of additional logs if you compare both full logs

I wonder if this is all intended? The repeating `Monotitor removed` at the very least looks very wrong.

## Additional Information

This additional activity seems to mirror also the **huge** additional CPU load:

![Image](https://github.com/user-attachments/assets/7920fba9-f0cd-4ef7-8e63-1629de9063e2)
![Image](https://github.com/user-attachments/assets/94676ca1-3869-4383-921c-650a33200248)

Average CPU usage in the example goes up from ~90% to >200%. This is a regression in my books.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.