Skip to content

All subapps use their own ComputeTaskPool by default #4791

Closed
@james7132

Description

Bevy version

de2b1a4, also happens in v0.7.

Operating system & version

Any

What you did

Use RenderPlugin via DefaultPlugins

What you expected to happen

A single global ComputeTaskPool is spawned, with a 1:1 correspondence with the number of logical CPU cores on the machine (32).

What actually happened

Two separate ComputeTaskPool s were spawned, one for each subapp. A total of 65 threads were spawned (1 main + 32 for each sub app).

Additional information

ParallelExecutor inserts a default CompteTaskPool if there isn't one stored as a resource. When spawning the render sub-app, the main world's ComputeTaskPool is not cloned and inserted into the render app's.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-AppBevy apps and pluginsA-RenderingDrawing game state to the screenA-TasksTools for parallel and async workC-BugAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile times

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions