Severe lag spikes on block updates
xtremeqg opened this issue ยท 4 comments
Great mod, and the reason I signed up to github. Unfortunately while playing the Regrowth pack, I noticed very severe lag spikes when placing down chop sticks in a large-ish field. Experimentation showed it was only when placing chop sticks in a chunk that contained roughly 150 various kinds of plans on chop sticks. Placing chop sticks in a chunk directly adjacent to that chunk caused no issues.
Now there are roughly 300 plants on chop sticks in that same chunk (multiple layers) and the lag has gone so bad my FPS drops from 45 to 1 simply breaking any kind of block with a pickaxe. Breaking several blocks with a hammer made a world hole gap visible for half a second, showing the plants above before finally the chunk was redrawn.
I'm not too well-versed with Minecraft internals but I can only guess it has to do with the plants being entities and having quite a bit of NBT data attached to them. I'm guessing that somehow any chunk update causes a full reparse of every chop stick in that chunk.
I've tried Optifine which yielded no effect other than raise my average FPS. The lag spikes when breaking or placing anything remains.
At this point, any form of automation is out of the question as it would just permanently destroy my FPS to the point of making my world unplayable.
Crops are non ticking TileEntities to hold the data. IDK why you need 300 of them, and certainly not why you put them all in one chunk, when you cause a block update, the chunk's vertex buffer will be reloaded causing your issue. All I can do is recommend you to spread them out over multiple chunks.
Sorry for the delay in responses, this is why I need over 300 (now at 1536): http://ftbwiki.org/Regrowth And this is how it ends up looking like (1 of 4 floors). This is using AgriCraft-1.7.10-1.4.3. I have noticed that the spikes are far less for specific kinds of plants but I have not yet narrowed down which types cause it. I gave my instance 4GB of ram but never seems to use more than 30% of that.
If it's vertex buffer updates that are causing problems I might be able to work around the problem by chunk loading and never visiting the area?