Pure Daisy Lag
Yamza opened this issue ยท 8 comments
I realize this issue is similar to #2728, however it appears that issue was resolved while profiling reveals the Pure Daisy still has some serious issues.
https://i.imgur.com/rDRjtmq.png
Version Information
Forge version: 14.23.5.2760
Botania version: Botania r1.10-356
Modpack: ATM3 - Remix
please use an actual profiler tool like warmroast/spark and post a profiler report here.
LagGoggles is good for coarse on-the-fly debugging but we need detailed statistics to dig in further
I don't seem to be smart enough to make warmroast work and I cannot seem to find anything relevant about spark on google.
I tried to help contribute but I feel like these profiles are useless, all I can see are client/render methods. Already did the hard part so I might as well share in case it helps:
I created a test pack with just botania, JEI and a couple profile mods (tickprofiler, sampler, etc) and created a classic superflat world for testing.
I set to peaceful and set mobspawning and dodaylightcycle gamerules to false. The test setup involved a grid of 5x5 pure daisy (non floating) spread apart by one air block between them. I took 4 different samples with VisualVM, each ~30 seconds or more in each situation. I fully exited both VisualVM and minecraft and re-started each between each session.
Starting "baseline" profile (01)
was taken with NOTHING placed/changed. It was sampling while I was disabling mobspawning and killing entities so that might show up but there was no botania items placed or existing in-world at this time
Idle with air (02)
was taken after placing the pure daisies and nothing else
While transforming (03)
was a sample that was started immediately after a /fill ~-16 ~-1 ~-16 ~16 ~ ~16 stone 0 replace air
centered on the daisies. The profiling was stopped the moment I saw the transformation complete
Idle with Livingrock (04)
was taken (after a fresh restart) of the flowers and adjacent livingrock. I had cleared out the stone before starting this profile
I glanced through the snapshot results and could not find anything notable besides some particle and other rendering/client related tasks. Maybe this issue is related to a mod interaction (eg in the full ATM3 Remix pack as originally reported) or more apparent/visible on servers instead of single player. Regardless I had hoped this would be more useful but we might still need a Spark/WarmRoast snapshot from a live, active server to find anything actionable.
Profile before placing the Pure Daisy: https://sparkprofiler.github.io/?LByP68wpky
Profile after placing the Pure Daisy but before placing wood: https://sparkprofiler.github.io/?idBaPmU1w3
Profile after placing wood: https://sparkprofiler.github.io/?QJhhcXHBQk
2nd profile with the Living Wood sitting next to the daisy: https://i.imgur.com/aVeYfzE.png https://sparkprofiler.github.io/?SEPDQt2yJG
Laggoggles dump:
[14:35:35] [main/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] 13916 micro-s/t: TILE_ENTITY: {WORLD_ID=0, BLOCK_NAME=TileSpecialFlower, BLOCK_POS_X=-278, BLOCK_POS_Y=75, BLOCK_POS_Z=285, BLOCK_CLASS_NAME=vazkii.botania.common.block.tile.TileSpecialFlower, NANOS=167003312}
Note: this was done in Single Player, not on a server. I also didn't turn off mobs or anything like that but I will redo it if needed.
Note2: Just placing the daisy seems fine. Only after placing wood/stone next to it does it jump in tick rate. Removing the blocks when complete seems to correct the issue in single player, but that did not seem to be true on server.
Note3: Seems like it has to do with how block detection is being done?
Spark is pretty easy to use, you just drop the jar into mods and run some commands: https://github.com/lucko/spark
Oh, I'm dumb. The pure daisy lag has already been improved a lot, but the build with the fixes has not been released yet.
Anyways, the spark profiles show the pure daisy barely takes 0.3-0.5% of the total tick time. Entities take 27% of the tick time by comparison. So the LagGoggles reading is really just a false alarm.
The next build should lower the usage further.
Okay cool. Will check up on it again once it's been updated and added to the pack. Thanks!
I saw you removed the maps, which I think wasn't the actual issue as you said it was the copying of itemstacks. Have you tried something simple like this?
https://gist.github.com/phit/b46ccc0af6e9d5ff63e1ddc054540131
this would at least help with known blocks that are a valid recipe, which I would argue is what most people will place around their pure daisies