Calling 'OnEntityTakeDamage' warning, causing lag spikesFixed

The plugin is working as intended, but I do get these lag spikes that are visible on the server. They go away when I unload the plugin. Its a small priv server with 4-5 people playing. Config attached below. Any idea what could be causing this?

(21:45:28) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 149ms

(21:45:38) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took average 1162ms

(21:45:40) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 106ms

(21:45:40) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 111ms

(21:46:25) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 106ms

(21:46:38) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 110ms

(21:46:39) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 107ms

(21:47:28) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 124ms

(21:47:36) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took average 1140ms

(21:47:40) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 109ms

(21:47:40) | Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 107ms

{
  "General": {
    "Disable decay for all entities": true,
    "Exclude \"Other Multipliers\"": false,
    "Use permission": true,
    "Permission": "nodecay.use",
    "Output": {
      "Output to server console": false,
      "Log to file": false,
      "Log file name": "NoDecay-Log"
    },
    "Cupboard Settings": {
      "Disable No Decay if resources placed in TC": false,
      "Require Tool Cupboard": true,
      "Cupboard Range": 30.0,
      "Block cupboard wood": false,
      "Block cupboard stone": false,
      "Block cupbard metal": false,
      "Block cupboard high quality": false
    }
  },
  "Building grade multipliers": {
    "Twig multiplier": 1.0,
    "Wood multiplier": 0.0,
    "Stone multiplier": 0.0,
    "Sheet Metal multiplier": 0.0,
    "Armoured multiplier": 0.0
  },
  "Other multipliers": {
    "furnace.large": 0.0,
    "small.oil.refinery": 0.0
  }
}

getting this as well

I wasnt able to find a solution. I removed a few plugins that were added recently with no effect. I just removed no decay and just went with the server settings of no upkeep and decay scale 0. If you ever find a solution and post here I would appreciate it. Thanks. 

iVyg4AHjesz7VUp.jpg disKord

I wasnt able to find a solution. I removed a few plugins that were added recently with no effect. I just removed no decay and just went with the server settings of no upkeep and decay scale 0. If you ever find a solution and post here I would appreciate it. Thanks. 

I did the same thing. I believe this plugin is checking every entity which could decay ondecay event. this is causing the massive lag spike depending how many objects are in the world.

The only solution I can think of is logging those entities, ignoring the call and slowly apply the decay logic to them in a staggered manner. This should make it usable on big servers.

Most of the lag comes from me using a performance heavy method of detecting if any tool cupboards are close since with the cheaper method I was using before, some people were reporting unexpected behaviour.

I think I have another method for this that might be a little bit faster, it should be available soon.

Yea i am having the same issue too.  i had to shut down my server cause it is unplayable.  it Seems to spam every 2 or 3 seconds.

Merged post

Still having the same issue even after the update.

Merged post

The mod spams the "Calling 'OnEntityTakeDamage' on 'NoDecay v1.3.0' took 149ms" on my server every second and won't stop.  Can we please fix this.  i may have to go to an older version since that didn't cause any issues.

Hi There,

i saw some posts about this but they were 1.3.0 or lower.
Did you fix this?

https://i.imgur.com/eLBuNc1.png

Entitysnumber is going higher and this spams 4 Times this Calling thing, the Server FPS drops to 60.

So maybe anyone can help me to have No Decay until this is fixed.

if i do decay.scale 0 and decay.upkeep false and then server.writecfg it dosent work... Anyone with a Solution?

Thank you!

Best Regards
Daniel

90gublGqmLTBIN6.jpg Iceskull

Hi There,

i saw some posts about this but they were 1.3.0 or lower.
Did you fix this?

https://i.imgur.com/eLBuNc1.png

Entitysnumber is going higher and this spams 4 Times this Calling thing, the Server FPS drops to 60.

So maybe anyone can help me to have No Decay until this is fixed.

if i do decay.scale 0 and decay.upkeep false and then server.writecfg it dosent work... Anyone with a Solution?

Thank you!

Best Regards
Daniel

same issue with server decay. those commands dont seem to work

TYqJHahtsDCYj6I.jpg Iceskull

Hi There,

i saw some posts about this but they were 1.3.0 or lower.
Did you fix this?

https://i.imgur.com/eLBuNc1.png

Entitysnumber is going higher and this spams 4 Times this Calling thing, the Server FPS drops to 60.

So maybe anyone can help me to have No Decay until this is fixed.

if i do decay.scale 0 and decay.upkeep false and then server.writecfg it dosent work... Anyone with a Solution?

Thank you!

Best Regards
Daniel

Which version are you using?

I'm using the new branch - latest version

jRUQJHTZ4NKN6QT.png 0x89A

Which version are you using?

Well 1.3.1 but i saw you updated it 5h ago, you fixed it?


Merged post

Nope with 1.3.2. still the same, even do 6 Callings before it was 4...
Idk could you fix this? I will buy you a beer or two :)

4efy4Z2Y9XKpv6l.png

Even with the newer update still having lag issues.  The bigger the buildings get, the more the mod spams and lags the Server.  I had to revert back to " NoDecay v1.0.40 by RFC1920" cause it doesnt' cause any issues.

Hopefully he can get the problem fixed cause this Mod is great.  MAybe get a copy of this version i am using and look at why yours is spamming and this one isn't.

Should be fixed, update has been pushed.

Locked automatically