minetest-mods / technic

Technic mod for Minetest
Other
145 stars 155 forks source link

Performance of huge networks #426

Open HybridDog opened 6 years ago

HybridDog commented 6 years ago

If you build a network which connects the spawn with houses of players spread all around the map with HV cables and you are alone on the server in a player's house, is the whole network loaded to make it work or is only part of the network loaded?

numberZero commented 6 years ago

When the switching station (that is, its contained map block) is activated, it scans the network first loading but not activating all the blocks it spans. After that, it keeps all connected machines (but not cables) loaded as long as it remains active.

To prevent such behavior, network can be split using battery boxes, these can be connected to several otherwise independent networks simultaneously. Supply converters separate networks as well.

git512 commented 5 years ago

How does one connect battery boxes to separate networks simultaneously?

numberZero commented 5 years ago

@git512 by placing cables around the battery box and not only under it. They may not appear to connect in recent versions but will actually connect nevertheless. Just make sure not to connect them directly to each other. And please don’t abuse #277.

ghost commented 5 years ago

Ok understand so far, that block with the Switching Station and one cable under it is activated, or two blocks if cable is under another block, and the switching station is scanning and keep up all other machines on that network from THIS switching station.

So, if there is an converter included on an HV canble, mean under it, what about the network (MV or LV) under the converter ? (I guess also active al long there is another needed switching station connected to that mv or lv cable and doing the same, scanning and keep machines active ?)

HybridDog commented 5 years ago

check_connections could use minetest.load_area if get_node_or_nil (replace get_node) returns nil. I think that load_area is available since minetest 5.0.0. https://github.com/minetest-mods/technic/blob/c14521cbd226073f1cf553e0f518863ce7f7e51a/technic/machines/register/cables.lua#L31