-
-
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
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
Bevy version
de2b1a4, also happens in v0.7.
Operating system & version
Any
What you did
Use
RenderPluginviaDefaultPluginsWhat you expected to happen
A single global
ComputeTaskPoolis spawned, with a 1:1 correspondence with the number of logical CPU cores on the machine (32).What actually happened
Two separate
ComputeTaskPools were spawned, one for each subapp. A total of 65 threads were spawned (1 main + 32 for each sub app).Additional information
ParallelExecutorinserts a defaultCompteTaskPoolif there isn't one stored as a resource. When spawning the render sub-app, the main world'sComputeTaskPoolis not cloned and inserted into the render app's.