Closed TerminatorNL closed 6 years ago
Specifically I started thinking about this from 2 issues - the pseudo-flowing water blocks that Streams adds and the lag we've gotten in the past of Forestry leaf blocks. Would love to be able to see what kind of lag they're producing.
But as I've built quite a few modpacks, I've also rejected mods in the past because all kinds of blocks were clearly adding to lag either fps or tps, even ones that were just decorative - you never can tell what is going to stuff up your server, which is where this tool would be invaluable.
We had to stop playing our last world, as something(s) was/were causing way too much lag but because we were running so many mods, we just weren't able to pinpoint exactly what was doing it, and it was probable that it was a bunch of stuff from different mods. Got to the point where the chunks were getting corrupted because their save information was too large for the game to handle - first time I've seen that happen.
Hrhmm...
I looked at the forestry source, and traced the update method for the leaves back to forge. It's inside WorldServer.java
in the tick()
method. I completely missed this, being focused on entities alone.
I will definitely support this!
Another type of "item" that I always wondered about were the multiblocks like Forestry's Alveary - they constantly update when you remove or add a block to them, so they must be checking for their state all the time. How well has that been done ? This is different from the approach to multiblocks in Immersive Engineering where you have to do something specific to create the multiblock and it therefore presumably doesn't check the state of all the blocks all the time.
I did some digging, and to give you a quick rundown:
Not quite elegant, but it works
It does work, but how much is it slowing down our servers - is having 10 of them a critical drain ? what about 100 ? Those are the kind of issues every server organiser would love an answer to, particularly if you can supply it in a nice visual online format.
I can't tell at the moment, but I guess we'll find out when I add support for it!
Some more ideas that popped into my head today: (1) it would be good to be able to adjust the distance you're scanning at to be more or less than the default. (2) an option to only do the block / item you're pointing at.
Option 1 is included in version 3.0! This is only for non-operators, however.
Zygus42 #21:
I will look into this, I'm currently working on another project so it could be a while before I get to this.
Side note: Liquids do not update after they're done flowing, (At least: lava and water do not, this is part of the BlockDynamicLiquid class. 👍) Rather: They check their surroundings if a neighbouring block sends an update; or when initially placed.
If you have some examples for me to test on, that would be nice.