dmulloy2 / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
1.04k stars 257 forks source link

I need ProtocolLib cpu usage optimization? #3276

Open Uaizi opened 1 month ago

Uaizi commented 1 month ago

Describe the bug cpu usage increasing unduly

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior My server seems to be fine, but above 40 players it has become impossible, ProtocolLib started to increase CPU usage in a surreal way, I can't understand why or identify the problem.

Screenshots link to spark

Version Info Provide your ProtocolLib install info with /protocol dump through pastebin.

Additional context None, I'm completely lost and confused.

Uaizi commented 1 month ago

https://spark.lucko.me/m6AFF0F95D

lukalt commented 3 weeks ago

Hi,

after reviewing the spark profile, I do not believe ProtocolLib is causing the performance problems you are observing. For ProtocolLib, it mainly reports Epoll wakeup calls, which are not part of ProtocolLib itself but are associated with ProtocolLib due to the way ProtocoLib hooks into the server.

Ingrim4 commented 3 weeks ago

I agree with @lukalt, since ProtocolLib is used by multiple plugins it's unlikely that ProtocolLib is at fault. Maybe try removing some of the heavier plugins like RealisticSeasons that use ProtocolLib work with chunks as the MSPT seem to roughly correlate to your increase in chunks. {3683837C-F1B7-4D7F-9F73-2C6A520F83A5}

Another thing I noticed is high command block usage about 5% per tick. {0D93EC43-2A73-43A0-951D-68A6F96920B6}