Skip to content

iOS mobile windowing-related performance regression and log spam #16541

@extrawurst

Description

@extrawurst

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
Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesO-iOSSpecific to the iOS mobile operating systemS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions