PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
49 stars 21 forks source link

Font image and text effect replacement in chat causes lag at high frequencies #3792

Open Projecki opened 2 weeks ago

Projecki commented 2 weeks ago

Terms

Discord tag (optional)

No response

What happened?

ItemsAdder is causing lag: https://spark.lucko.me/MS1XdG5W3u view plugins

Steps to reproduce the issue

n/a

Server version

This server is running UniverseSpigot version git-UniverseSpigot-"1954a51" (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 1954a51 on ver/1.20.4-stable) Universe-git-UniverseSpigot-"1954a51" (MC: 1.20.4)

ItemsAdder Version

[18:17:40 INFO]: ItemsAdder version 3.6.4-release-2 [18:17:40 INFO]: Customized Minecraft without client mods! [18:17:40 INFO]: Website: devs.beer [18:17:40 INFO]: Author: LoneDev

ProtocolLib Version

[18:18:06 INFO]: ProtocolLib version 5.2.1-SNAPSHOT-689 [18:18:06 INFO]: Provides read/write access to the Minecraft protocol. [18:18:06 INFO]: Authors: dmulloy2 and comphenix

LoneLibs Version

[18:17:53 INFO]: LoneLibs version 1.0.54 [18:17:53 INFO]: Collection of libs used by my plugins [18:17:53 INFO]: Authors: LoneDev and others

Full server log

No response

Error (optional)

n/a

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

Andre601 commented 2 weeks ago

You're using an outdated version of ItemsAdder for 1.20.4, please update it.

Andre601 commented 2 weeks ago

In addition did you not provide the server logs, as requested. And as a final note are you using some random fork that IA is not tested against, so it could also be an issue with them messing things up.

Andre601 commented 2 weeks ago

And as some final notes:

tl;dr: Barely anything in your Spark report hints at Spigot really being at fault here.

LoneDev6 commented 2 weeks ago

Based on that: image

Seems to be related to the text effects and font images replacement in chat. You probably didn't set a limiter to the chat so people can spam the chat very fast. What you can do is:

I find it quite strange to be honest because I already optimized that code as much as possible, so seems caused by the amount of messages sent rather than my implementation performance.

Projecki commented 2 weeks ago

I'll disable font image and text effects, we don't even use those actively.