[Suggestion] Increase performance of Solar/Water-Gen

  • Basically these two Generators provide a lot of lag if you use many of them.


    1. Water-Gen


    a) Maybe an option to switch the operation-mode. If you build water-gens that are fed with buckets there is no need to check the surroundings, so it would be good if you could disable this check.
    b) Increase the period of the checks. I guess a water-gen checks every tick for nearby water. Couldn't it store the data for a minute and check again later?


    2. Solar-Cells


    a) You could increase the period of the checks. Actually I also don't know how often solars check the conditions. But if they check every 5secs this should be enough.
    b) You could also devide the solars into one block that actually detects the condition and delivers it to all horizontal adjacent solars. So instead of 9 Solars that check for condition you would only have on condition-check for 8 Solars.



    I actually don't know anything about wind-gens. I guess they involve some checks too, but no idea how ugly this could get. But I actually encountered the problem with solars and I read about the water-gen issue.

  • perhaps Al could make it so that it checks at night, and the first second it detects daylight, it doesn't check again for x, where x equals the amount of time in a day. After that time is up, it checks once, then doesn't check again for y, where y equals the amount of time in a night. The only flaw in this would be if the player is building around it and obstructs the sunlight. Maybe it could detect block updates in all of the chunks above it? But that would involve more checks, which defeats the purpose of the fix in the first place...


    My train of thought just crashed..

  • Well it still needs to check for rain.


    It won't make sense to let your solars get sunlight for some seconds and after that building something over them which you need to remove the next day. So actually they do not need to check often for sunlight, but rain is a little bit different.

  • A few seconds wont change the gameplay much but i think it will reduce the amount of checks it has to do per seconds by a ton. I mean its not like someone is gonna make a piston system just to get underground solar power....

    I wouldn't be surprised if they did, tbh...


    Although I'm beginning to wonder what kind of servers are the ones experiencing the most lag with this issue...

    Would anyone like to try a Slowpoke Tail?! Only 1 Million Yen!


    Quote

    this isn't about arrogance or ego, I have a block that I put a lot of freaking work into


    Every Mod Author, in existence. And yet, you STILL say otherwise.

  • Actually the best solution (for solar, anyway) would be to have some kind of onWeatherChange event (in Forge, maybe?) that fires off when the weather changes, and at dusk/dawn, which would eliminate a lot of that checking completely. As for obstructing solars with blocks... they do have a battery in the recipe, so having them only check every few seconds wouldn't be that bad.


    Wind & water wouldn't need to react to changes instantly, either.

  • just dont place hundreds of solars the must you will ever need is 32 and use alternative energy...... and i just thought it was the windmills that produce exxessive lag

    still rocking the GMA 950 card :D overclocked to the point of smoking. :huh: hahahahaha now i got my 525m now that thing does work 8) :P :D

  • Windgens are already supposed to update once every 1024 game-ticks (which is 51.2 seconds) according to various other posts, IIRC by Cadde and bugfixes in release notes.

    • Official Post


    Please don't make code-based improvement suggestions without taking a look at the code.
    Kinda everything you mentioned (cept for 2b) is implemented since 1.23 or something. though we further enhanced the efficiency of some gens in the last update.