-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
All subapps use their own ComputeTaskPool by default #4791
Copy link
Copy link
Closed
Labels
A-AppBevy apps and pluginsBevy apps and pluginsA-RenderingDrawing game state to the screenDrawing game state to the screenA-TasksTools for parallel and async workTools for parallel and async workC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-AppBevy apps and pluginsBevy apps and pluginsA-RenderingDrawing game state to the screenDrawing game state to the screenA-TasksTools for parallel and async workTools for parallel and async workC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times