-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use switching station ref counters #265
Conversation
Also every switching station now works for supply/demand monitoring but instead of being activated by globalstep it uses switching station nodetimer:
|
Also brings little performance boost for globalstep for not checking switch node / mesecons and generally reduces globalstep loop code. |
For network.swpos hash table could be used for tiny bit faster lookup, I did think about it but decided to not do that because performance gain is minimal and also wont affect globalstep or any regular / timed functions. |
Click for detailed source code test coverage reportTest coverage report for Technic CNC 87.33% in 11/14 files:
Test coverage report for technic chests 45.56% in 6/6 files:
Test coverage report for technic 60.76% in 95/95 files:
Raw test runner output for geeks:CNC:
Chests:
Technic:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested, appears to work fine. did not check in depth
can't test this right now but LGTM 👍 |
Partial implementation for issue #264
Removes switching station node checks from globalstep and uses switching station counters to decide if there's still switching stations present.
Switching stations can be removed from network without executing on_destruct but that should not really be big issue, network simply keeps running until TTL is reached and then stops.
Normal switching station removal will still reset network but now you can remove switching station above "master" node without resetting whole network, instead all switching stations have to be removed which is more correct behavior.