-
Notifications
You must be signed in to change notification settings - Fork 678
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
Consistent network rebooting using a controller and infinite channels #8274
Comments
The network always reboots when nodes are added/removed. |
Yeah I noticed that too.. That is just silly and very unfortunate |
The network doesn't reboot when there is no controller while using infinite
channels; at least if it does, there is no disruption to terminals or interfaces
…On Wed, Dec 11, 2024, 11:38 AM jpeaglesandkatz ***@***.***> wrote:
Yeah I noticed that too.. That is just silly and very unfortunate
—
Reply to this email directly, view it on GitHub
<#8274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3UD2KN2IQZHT56FEXMYY32FCIERAVCNFSM6AAAAABTMVQ6IKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZWHE2TCMZUGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
This code is pretty good... I believe I've isolated the issue to an assumption in https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/main/src/main/java/appeng/me/service/PathingService.java#L117-L129 that assumes a controller means the network needs to be rebooted even when using infinite channels. A simple fix may be to add I need to investigate the differences between |
On one hand, my hack most does what I want - the network goes through a 1-tick reboot which is too fast for client UIs to flicker or interrupt users. Additionally, this actually improves performance for infinite-channel networks that use a controller as well however the power usage ends up being very incorrect. I traced this down to differences in the calculation methodology between the AdHoc process versus
PathingCalculation uses way less power because it simply allocates fewer channels; this is because Adhoc networks essentially allocate every channel to every block for the purposes of power consumption. I guess the best thing I could hope for would be an optimization to the pathfinder to not need to walk the network twice |
Well PathingCalculation always needs to walk something twice but I think there's an optimization that can be made by allowing intermediate pathing work to be persisted and then PathingService can delegate add/removeNode to this persistent calculation. When adding a node, there's no need to reboot the grid if a channel can be found - if one can't be found; attempt a reboot exactly once (same behavior as today) I am worried about the memory consumption of this possible fix though; Java being Java and all. I might get more time to play around with this but who knows honestly. While this is a lot of effort to bring infinite-channel /w controller networks to be less annoying, it does optimize the core grid add/remove for all types of networks and so might just be worth it |
…repath conditions There are several ways that a network can enter the "rebooting" state however only a few actually have consequence to the overall network state. This change removes the need for the network to reboot during "simple" Grid merges while still enforcing rebooting for "complex" merges. A simple merge is one that has no bearing on the network pathing; imagine a long cable with no channel-consuming devices attached to it and then you add another cable. A complex network merge is everything else. Of note: half-items like P2P, Quartz Fiber, and all terminals always force a complex merge for some reason but seeing as the network needs to reboot to calculate their energy/channel consumption; this is preferred.
I think I made some progress here: #8279 I also think i can actually use optimistic updates to 1/2 the amount of grid traversal that |
Describe the bug
I'm running with
appliedenergistics2-forge-15.2.13
using the"channels": "infinite",
config option. This issue does not happen when only using an energy acceptor instead of a controller.When there is a controller on my network, the network reboots every time a cable is added or removed. When there is not a controller on the network, there is no reboot.
I want to use a controller because it decreases the passive AE drain.
This screenshot is a small network that exhibits this issue. My real network is much more complex and part of a modpack but I reproduced this issue running only AE2. Additionally, my network does not reboot when I make changes without a controller so I think I've isolated the issue to be related to the controller.
This network reboot issue is causing issues for my friends and I because it resets UIs and stops general auto-crafting until the network reboots. We can mostly work around it by setting
pathfindingStepsPerTick
to128
however that causes some TPS lag in our world.How to reproduce the bug
Create a network using infinite channels and add a controller. Add a cable. The network will reboot.
This issue is more obvious with larger networks. You can set
pathfindingStepsPerTick
to1
to simulate a 4x larger network than you build.Expected behavior
The network should not reboot as it doesn't need to without the controller.
Additional details
Optionally, a config option to disable the increased AE drain on controller-less networks would also allow us to work around this issue.
Which minecraft version are you using?
1.20.1
On which mod loaders does it happen?
Forge
Crash log
Does not crash
The text was updated successfully, but these errors were encountered: