Skip to content

Some way to disable FrameTimeDiagnosticsPlugin at runtime #3767

@SUPERCILEX

Description

@SUPERCILEX

What problem does this solve or what need does it fill?

Say I'd like to show an FPS counter. Ideally it would use FrameTimeDiagnosticsPlugin, but that means frame metrics will always be tracked (slightly hurting performance).

What solution would you like?

Ideally, FrameTimeDiagnosticsPlugin would only run when I'm showing the FPS counter and be disabled otherwise.

What alternative(s) have you considered?

Copy the code and modify FrameTimeDiagnosticsState to have an enabled flag so it can stop computing frame timings. Ideally, Diagnostics would also have an API to remove entries so memory can be reclaimed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DiagnosticsLogging, crash handling, error reporting and performance analysisC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions