CrazyEnchantments icon indicating copy to clipboard operation
CrazyEnchantments copied to clipboard

[Bug Report] GetLore() misuse

Open Koozu1 opened this issue 2 years ago • 0 comments

Describe the bug Huge performance issue!

Versions (please complete the following information):

  • Minecraft Server Version: 1.19
  • Plugin Version: 1.9.4

Issue Huge performance loss from converting new lores to legacy strings when using getLore method. the method Lore should be used instead because getLore is deprecated and slow. And in the second link, the getLore check is useless anyway if hasLore is also checked! 35% ticktime to this on 50 players

https://github.com/Crazy-Crew/Crazy-Enchantments/blob/b8c3bc5cea71a076b234c3bbab1495982395788a/src/main/java/com/badbones69/crazyenchantments/api/CrazyManager.java#L554-L570

https://github.com/Crazy-Crew/Crazy-Enchantments/blob/b8c3bc5cea71a076b234c3bbab1495982395788a/src/main/java/com/badbones69/crazyenchantments/Methods.java#L388-L390

Screenshots

image

Koozu1 avatar Aug 10 '22 17:08 Koozu1