Mariculture

Mariculture

2M Downloads

Mariculture Tick Time rises over 1000 μs when generating chunks

ajthemacboy opened this issue · 5 comments

commented

I've recently noticed that on my custom modpack server, chunk generation takes far longer than it used to.

When using the OPIS tool by ProfMobius, I see that when generating chunks, the tick time rises above 1000 μs. Here's a screenshot of the OPIS readout: http://i.imgur.com/lspBc06.png

I took a profiling sample using Sampler by Player, the developer of FastCraft: https://www.dropbox.com/s/g89d9a3y0ypma7r/sample1.nps?dl=0

Perhaps you can interpret this and see what's wrong. This delay, however, results in a severe drop in TPS, sometimes down to about 10.

Thanks for your help!

commented

Can't do anything about it. It is generating a LOT of limestone so it is going to cause lag, same when generating the coral/kelp, they aren't light generations. They are over large areas. It's doing a lot of stuff. Turn them off, if it bothers you that much.

Also the timings of the others are not proportional. This is doing the vanilla thing of replacing the top blocks, instead of letting vanilla handle it. Which is a lot more than just generating some ore.

commented

I don't mean to sound rude, but I am positive that there IS something you can do it about it.

My server runs at constant 20TPS with 8+ players online on a 150 mod server. We even use a custom version of Biomes O Plenty that essentially makes it 'amplified' terrain.. it's far more intensive than normal BOP and we handle it fine.

We also have other mods like BattleTowers, Ruins, and ChocoalateDungeons. These all generation massive structures that override the default terrain, just like coral reefs and limestone, with no problem.

Combined with the proof I have that this IS mariculture, and not a conflicting mod, I know there is something you can do.

Perhaps instead of replacing the blocks after the terrain has already generated, you can just modify the ocean code to generate limestone. And for the coral reefs, BOP has near identical coral reefs, which I have said generate just fine with no lag.

commented

What you said about modifying the ocean code for limestone. That is exactly what this event is doing. It is instead of replacing it with gravel, replacing it with limestone and sand. Doing the exact same thing vanilla would, just using my blocks instead. You're actually seeing timing for vanilla code with that event. It's going through the entire chunk, doing the replacing of blocks, that VANILLA would do, or the biomes themselves would do. E.g. in a mesa biome, it would include the timings for placing all that hardened stained clay. But instead of vanilla doing it, it's passed through the event. So it includes biome specific things, from other mods in it's reported timing too, because it is handling it, instead of vanilla. And from experimenting with replacing the ocean biomes themselves rather than that event, you actually end up with giant mushroom island biomes everywhere.

I'm not saying, I couldn't improve it slightly. But I just want you to understand, that the times reported, aren't actually proportional to what the mod itself is actually doing.

(And as for the coral, a fews bit of coral dotted around here and there is a lot less intensive, than spawning the coral rock, so it's not really a fair comparison, but I understand it gives the same idea)

commented

Alright, I understand what you're saying, but why does it not lag when Mariculture is removed? What I am saying is; it must be making laggier changes than a normal mod would.

commented

^ You can disable the limestone generation, If you have another mod that adds titanium or limestone it's not an issue. (Or make the titanium spawn with cofh). Or just not the use mod. It would lag a bit more than normal generation under the same conditions because it's checking the biome type each time, to check whether it should do vanilla replacement, or my own replacement. And when it does the generation, it's a bit worse than normal oceans, because it's sometimes placing rutile instead of limestone.