-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move TaskDrivers to execute like OO Commands #241
Comments
Should we re-evaluate this as we get to use TaskDrivers in more situations? It may be that we have two variants or modes for them to operate in. |
Yeah sorry, I should have been more clear. I do think there are two variants. Before we had
If you have one driver with 10,000 elements, and the other 9 each had 1 element, you'd still have 10 separate jobs running with a pretty big imbalance. So we offered the concept of The downside that we're running into is that in order to do that, we have to choose (or have Unity choose for us) a point in time during the frame to execute a given type of TaskDriver/System combo's jobs. And that leads to the one frame delay for each time we try and convert an element into a different element. I'll use
All the +1 frame aspects add up and could go away. The two variants I see right now are The regular When we hit an All the Driver jobs get a chance to go ahead and write to these by executing first. Once all the Drivers are done, all the Our Wander example becomes:
|
The current parenting is kind of gross: https://github.com/decline-cookies/anvil-unity-dots/pull/247/files#r1190560198 As part of this, fix this API and how it works. |
TaskDrivers today work on the concept of doing everything they can to work on massive data-sets in parallel without having write contention.
The downside is that all data must be consolidated during a consolidation phase at the beginning of the frame which leads to at least a one frame delay if going from TaskDriverA to TaskDriverB.
To ensure consistency and prevent endless refactoring of ordering, we've made it so that it's always a one frame delay.
In practice we've seen that this isn't the most ideal way to use them. TaskDrivers tend to go deep with many Sub Task drivers to enact all the functionality required to complete a "Task".
This could lead to situations where it takes a noticeable amount of frames to get through the initial work to start doing something.
The change now is to have on-demand consolidation and run all TaskDriver jobs in order based on their Top level Task Driver.
All TopLevel TaskDrivers would get a chance to execute. They would schedule their jobs and so would their sub task drivers and so on down the chain. Developers would be able to order that scheduling as they know the flow of events to be able to efficiently burn through as many jobs as possible in one frame, only stopping when going to a job that will need to process the data over time or when complete.
The text was updated successfully, but these errors were encountered: