X Tutup
Skip to content

Performance: XRServer consuming time when idling even when there is no XR running. #116894

@migueldeicaza

Description

@migueldeicaza

Tested versions

Every Godot version that launches the XR server triggers the XRServer to do expensive work, even if there are not XR interfaces available, burning CPU.

This is part of my investigation of why Godot was missing update frames on MacOS, despite doing nothing: #116845 (comment)

XRServer is not really my domain of expertise, but I would think that we should not really run any XR steps if there are no XR devices active:

this is called from Main iteration:

XRServer::get_singleton()->_process();

Measured in Rocket Chat thread as consuming 3% of CPU when idling: https://chat.godotengine.org/channel/apple?msg=zyz8Ey4X4qMmGM4xG

System information

Any platforms.

Issue description

CPU being burned.

Steps to reproduce

Start Godot with any empty project, sit idling, and run a profiler, you will see XRServer consuming plenty of CPU.

Minimal reproduction project (MRP)

Any empty project will do.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs further info

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup