CitizensDev / Citizens2

Citizens - the premier plugin and API for creating server-side NPCs in Minecraft.
https://citizensnpcs.co
Open Software License 3.0
590 stars 313 forks source link

Lag in 1.16.1? #2257

Closed EasonChu7 closed 4 years ago

EasonChu7 commented 4 years ago

The latest version on spigot and using paper1.16.1 https://timings.aikar.co/?id=b2f707f2085e4682a30aa21cabe4c570

seems like the plugin cause lag?

SXRWahrheit commented 4 years ago

The "timings" system within Spigot/Paper is incredibly inaccurate for use with Citizens, and cannot be used to diagnose any issues related to Citizens. It notably blames Citizens for a significant amount of entity-related lag (that isn't in any way caused by Citizens).

For accurate timings, you need a Java profiler. There are a variety of profiler options (WarmRoast, YourKit, VisualVM, ...), but the simplest to use on a Spigot server is a plugin named "Spark" that embeds WarmRoast, which you can find here: https://www.spigotmc.org/resources/spark.57242/.

Please run a Spark report and provide the link.

mcmonkey4eva commented 4 years ago

Also, get rid of CitizensCMD, use the built-in click command system: https://wiki.citizensnpcs.co/NPC_Commands

And update Paper: https://papermc.io/downloads And update Citizens: https://ci.citizensnpcs.co/job/Citizens2/

Kamology commented 4 years ago

Not sure how similar they are but CommandNPC was our culprit of like a 5 day 10tps tirade. Instant 20tps once removed. We weren't even using it (unknown to us) which is extra weird.