Dropt

Dropt

3M Downloads

TPS and block lag with veinminer or anything that destroys multiple blocks at once

stateofboilingpoint opened this issue ยท 3 comments

commented

I am having big TPS drop when mining a lot of blocks at once. I change the drops for every ore block and when I veinmine for example coal, it drops the TPS from 20 to 13 for a minute and I see some block lag. I used BlockDropsTweaker later on which wasn't causing any TPS issue. Also, I have around 10-12 drops based on chance too.

commented

I'd really like to improve the performance issue that you are having, but I need more information.

  • Which version of Dropt are you using?
  • Which mining mod are you using, veinminer, ore excavation, or something else? Version?
  • Can you please provide a link to your scripts?
  • How big are the ore veins that you are mining?
  • Can you please provide a link to a log file containing profiling output? You can use the config option B:ENABLE_PROFILE_LOG_OUTPUT=true to enable profiling.
  • You mention in the title: "...anything that destroys multiple blocks at once". What else did you try that produced the issue?
  • Was this issue on a server? Single player?
commented

I just ran two profile tests using Ore Excavation.

The tests are set up to match a rule at the end of a rule list with 103,573 unique entries. The final matched rule has 411 weighted drops. In both tests, the Ore Excavation mod was used to mine 27 blocks simultaneously.

The first veinmining attempt takes a total of 95ms, which is about 2 ticks. A significant portion of that time is in the initial, one time only, rule cache.

[INFO]  Cached 1 rules from 103573 rules in 61 ms, blockState: minecraft:stone[variant=stone]

The second veinmining attempt takes a total of 32ms, which is less than one tick.

Here is the complete log file.

I didn't experience any noticeable block lag. To reproduce this issue, I still need more information about your setup.

commented

I just re-ran the same tests using Veinminer instead, and I got similar results. There was a slight visual difference, but I attribute that to the difference in how each mod handles the actual mining of multiple blocks.

The recorded performance results from Dropt were pretty much the same.