Major lag with this plugin

so im getting some huge lag spike due to this plugin. i dontate alot to nivex and couple other modders and had nives looking at some of my stuff when we saw this and said there is something u could do about it 

 

(05:41:59) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1053ms

(05:42:09) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1193ms

(05:42:19) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1418ms

(05:42:29) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1542ms

(05:42:39) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1570ms

(05:42:49) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1491ms

(05:42:59) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1461ms

(05:43:09) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1456ms

(05:43:19) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1397ms

(05:43:29) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1393ms

(05:43:39) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1356ms

(05:43:49) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1358ms

(05:43:59) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1435ms

(05:44:10) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1376ms

(05:44:20) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1382ms

(05:44:30) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1425ms

(05:44:40) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1359ms

(05:44:50) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1321ms

(05:45:00) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1128ms

(07:08:28) | Invalid Position: generic_world[39282031] scrap (world) (896.1, -503.6, -1799.4) (destroying)

(07:09:38) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1248ms

(07:09:48) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1304ms

(07:09:58) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1391ms

(07:10:08) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1406ms

(07:10:18) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1527ms

(07:10:28) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1563ms

(07:10:38) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1477ms

(07:10:48) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1535ms

(07:10:58) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1456ms

(07:11:08) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1414ms

(07:11:18) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1537ms

(07:11:28) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1506ms

(07:11:38) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1536ms

(07:11:48) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1448ms

(07:11:58) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1325ms

(07:12:19) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1055ms

(07:12:29) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1100ms

(07:12:39) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1092ms

(07:30:36) | Invalid Position: generic_world[39348980] scrap (world) (-1884.7, -505.9, 438.7) (destroying)

(08:40:36) | Invalid Position: generic_world[39472578] scrap (world) (1743.3, -507.4, -1155.2) (destroying)

(08:45:38) | Invalid Position: generic_world[39481316] scrap (world) (1789.3, -505.8, 657.3) (destroying)

(09:42:36) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1026ms

(09:42:46) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1127ms

(09:42:56) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1253ms

(09:43:06) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1288ms

(09:43:16) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1327ms

(09:43:26) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1441ms

(09:43:36) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1402ms

(09:43:46) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1483ms

(09:43:56) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1358ms

(09:44:06) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1430ms

(09:44:16) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1271ms

(09:44:27) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1427ms

(09:44:37) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1236ms

(09:44:47) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1207ms

(09:44:57) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1161ms

(09:45:07) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1188ms

(09:45:17) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1141ms

(09:45:27) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1160ms

(09:45:37) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1162ms

(09:45:47) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1168ms

(11:15:49) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1067ms

(11:15:59) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1177ms

(11:16:09) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1243ms

(11:16:19) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1222ms

(11:16:29) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1376ms

(11:16:39) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1475ms

(11:16:49) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1243ms

(11:16:59) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1420ms

(11:17:09) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1371ms

(11:17:19) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1332ms

(11:17:29) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1285ms

(11:17:39) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1326ms

(11:17:49) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1299ms

(11:17:59) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1336ms

(11:18:09) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1321ms

(11:18:19) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1457ms

(11:18:30) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1443ms

(11:18:40) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1445ms

(11:18:50) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1361ms

(11:19:00) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1222ms

(11:19:10) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1150ms

(12:46:16) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1019ms

(12:46:26) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1215ms

(12:46:36) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1239ms

(12:46:47) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1280ms

(12:46:57) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1309ms

(12:47:07) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1290ms

(12:47:17) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1271ms

(12:47:27) | Calling 'OnLootEntityEnd' on 'ScrapRaidProtection v1.2.4' took average 1335ms

(12:47:37) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1440ms

(12:47:47) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1356ms

(12:47:57) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1329ms

(12:48:07) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1314ms

(12:48:17) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1300ms

(12:48:27) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1228ms

(12:48:37) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1415ms

(12:48:47) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1444ms

(12:48:57) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1514ms

(12:49:07) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1487ms

(12:49:17) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1452ms

(12:49:28) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1364ms

(12:49:38) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1270ms

(12:49:48) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1096ms

(12:50:48) | Invalid Position: generic_world[39983427] scrap (world) (-1777.9, -502.7, 175.8) (destroying)

(13:00:48) | Invalid Position: generic_world[39991570] scrap (world) (-15.6, -501.8, 1844.8) (destroying)

(14:37:31) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1017ms

(14:37:41) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1026ms

(14:37:51) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1118ms

(14:38:02) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1183ms

(14:38:12) | Calling 'OnEntityKill' on 'ScrapRaidProtection v1.2.4' took average 1144ms

(14:38:22) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1238ms

(14:38:32) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1322ms

(14:38:42) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1308ms

(14:38:52) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1325ms

(14:39:02) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1328ms

(14:39:12) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1291ms

(14:39:22) | Calling 'OnLootNetworkUpdate' on 'ScrapRaidProtection v1.2.4' took average 1248ms

(14:39:32) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1230ms

(14:39:43) | Calling 'OnEntitySpawned' on 'ScrapRaidProtection v1.2.4' took average 1209ms

(14:39:53) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1258ms

(14:40:03) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1175ms

(14:40:13) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1186ms

(14:40:23) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1142ms

(14:40:33) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1107ms

(14:40:43) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1197ms

(14:40:54) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1074ms

(14:41:04) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1114ms

(14:41:14) | Calling 'OnEntityTakeDamage' on 'ScrapRaidProtection v1.2.4' took average 1042ms

hes saying this alone my be cuaseing alot of my server issues

I'll check it out and see what I can trim/optimize, thanks for reporting this!

Merged post

I made some minor performance tweaks in 1.2.4, let me know if you see any difference, further performance increases may require some major refactoring or removal of features.