Issue Description
Whenever a player dies a lag spike of a few seconds is observed.
Here's a profiling result over 5 mn while I did /suicide myself 19 times: https://spark.lucko.me/#1P1e1k76UW
From the look of it, the MemoryDataView.set() method is duplicating the whole data structure whenever setting new content.
The initial call to Entity.toContainer() account for ~4.65%, then the plugin add UnsafeData, encapsulate into an entity, add some id and version tag for a total of ~19% of CPU load (approximately 3 s lag per death).
I am currently running
SpongeForge version: 1.12.2-2838-7.2.4-RC4066
Forge version: 14.23.5.2854
Java version: 1.8.0_252
Operating System: Linux
Plugins/Mods: Mods (174): Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, SpongeAPI, Sponge, AE2 Stuff, AI Improvements, AgriCraft, Always Eat Mod, AntiCheat, AppleSkin, Applied Energistics 2, Arcane Archives, Arcane Essentials, Arcane World, Armourer's Workshop, Astral Sorcery, Automated Redstone, B.A.S.E, BD Lib, BNBGamingLib, Bad Wither No Cookie! Reloaded, Bauble Wings, Baubles, Bewitchment, BiblioCraft, Biomes O' Plenty, Blockcraftery, Blood Arsenal, Blood Magic: Alchemical Wizardry, Bookshelf, Bookworm Library, Botania, Building Gadgets, CD4017BE_lib, Cathedral, Chameleon, Chisel, Chococraft 3, Clockwork Phase, CoFH Core, CoFH World, CodeChicken Lib, Comforts, Construct's Armory, Cooking for Blockheads, Coralreef, CraftTweaker JEI Support, CraftTweaker2, CreativeCore, CreativeCoreDummy, Creeper Confetti, Cucumber Library, Cyclops Core, Diet Hopper, Doggy Talents, Dynamic Surroundings, Dynamic Trees, Dynamic Trees BOP, Dynamic Trees PHC, Electroblob's Wizardry, Enchanted Wolves, Enchanting Plus, End: Reborn, EverlastingAbilities, EvilCraft, EvilCraft-Compat, Extra Cells 2, Fairy Lights, Fast Leaf Decay, FastFurnace, FastWorkbench, Fence Jumper, FoamFix, FoamFixCore, Foamflower, Forbidden & Arcanus, Fossils and Archeology Revival, Garbage Bins, Garden Stuff, GraveKeeper, Guide-API, Guidebook, HelpFixer, Huggable Cactuses, Ice and Fire, Immersive Cables, Immersive Engineering, Immersive Posts, Infernal Mobs, InfinityLib, Inventory Pets, Inventory Tweaks, It's the little things, JJ Races, JourneyMap, Just Enough Items, LLibrary, LagGoggles, LemonLib, LittleTiles, LittleTilesCore, MTLib, Mantle, MetalChests, Metallurgy 4: Reforged, Minecraft Comes Alive, MmmMmmMmmMmm, Mod Tweaker, Morph, Morpheus, Mowzie's Mobs, Mowzie's Wings, Mystical Agradditions, Mystical Agriculture, Mystical Agriculture Tiered Crystals, Mystical Lib, Mystical World, Nature's Aura, NemesisSystem, Nether Chest, NetherPortalFix, OreExcavation, OreLib Support Mod, Pam's Cookables, Pam's HarvestCraft, Patchouli, Phosphor Lighting Engine, Placebo, PlusTiC, RandomPatches, Rats, Reborn Core, Redstone Flux, Redstone Paste, Reliquary, Runes of Wizardry, Runes of Wizardry - Classic Dusts Pack, Shadowfacts' Forgelin, Snad, Soul Shards Respawn, SpongeForge, Steam Age Revolution, Steam Motion, Storage Drawers, SwingThroughGrass, TBone, TOP Addons, TeamLapen Library, The One Probe, The Twilight Forest, Thermal Cultivation, Thermal Dynamics, Thermal Expansion, Thermal Foundation, Thermal Innovation, Thermal Logistics, TickCentral, Tinker's JEI, Tinkering With Blood Magic, Tinkers Tool Leveling, Tinkers' Construct, ToroTraits, Underground Biomes, Vampirism, VampirismIntegrations, Vending, Waystones, Whoops, Wings, WorldEdit, Zoo and Wild Animals Mod: Rebuilt, iChunUtil
Plugins (21): Minecraft, Minecraft Coder Pack, SpongeAPI, Sponge, AntiWDL, BetterChunkLoader, Brotkasten, Buycraft, CatClearLag, GriefDefender, HuskyCrates, HuskyUI, LuckPerms, MagiBridge, NuVotifier, Nucleus, Prism, Server Backup, Total Economy, WrapperPing, spark
Issue Description Whenever a player dies a lag spike of a few seconds is observed. Here's a profiling result over 5 mn while I did
/suicide
myself 19 times: https://spark.lucko.me/#1P1e1k76UWFrom the look of it, the MemoryDataView.set() method is duplicating the whole data structure whenever setting new content. The initial call to Entity.toContainer() account for ~4.65%, then the plugin add UnsafeData, encapsulate into an entity, add some id and version tag for a total of ~19% of CPU load (approximately 3 s lag per death).