Provide an explicit execution order/priority for systems?
See original GitHub issueAs I understand Entitas system execution today, the order of operation is based on what order the systems are added to the Systems object/collection.
Has there been any thought or appetite toward giving the developer overt control over execution order? I.e. when I add a system to the collection, I give an int priority. Every time a system is added to the Systems object they are sorted internally and executed in order.
Just a thought, as currently there requires a lot of thought as to what order your code is written for adding these systems.
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (4 by maintainers)
Top Results From Across the Web
How To Set Test Case Priority In TestNG With Selenium
In TestNG, Priority is an attribute that helps the users define the order in which they want the test cases to be executed....
Read more >Prioritizing tests in TestNG with Selenium
Priority is an attribute that tells TestNG which order the tests need to follow. When we have multiple test cases and want to...
Read more >System Order of Execution - Unofficial Bevy Cheat Book
System Order of Execution. Bevy's scheduling algorithm is designed to deliver maximum performance by running as many systems as possible in parallel across ......
Read more >Order of execution of tests in TestNG
We can assign priority if you have written number of test cases in your script and want to execute as per assigned priority...
Read more >Priority-Based Scheduling - an overview
First, we introduce preemption as an alternative to the C-function call to control execution. Second, we introduce priority-based scheduling as a way for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Well if you find it easier, fair enough. I personally find the priority approach easier because I don’t have to deal with a graph of dependencies; simpler code. Might not be easier to read but it forces me to keep the execution order in mind yet still easier than rearranging systems around. I can just change a number and it can be every ‘100’ or so if I want to run things in between.
Well, I find it easier to just declare that a system must run after some other systems rather than managing priorities with numbers.
What is the benefit of managing priorities? It seems to me that it is not really different from what I was doing earlier - having a list of systems in my GameController and thinking about what system goes first.
I like the dependency diagram because some systems are completely independent so I do not have to specify any order. But then there are some system that must be enabled after like 3 other systems so I just write it as [ExecutesAfter(…)] and it finds the order itself. I just have to specify the dependencies and don’t have to worry about the bigger picture.
PS: I have the “phases” mainly because my game has also a multiplayer and I need to maintain some invariants regarding systems order. It could work without them - just with dependecies.