HolographicDisplays icon indicating copy to clipboard operation
HolographicDisplays copied to clipboard

Too much consume on timmings

Open UnitedCraft opened this issue 2 years ago • 8 comments

Confirmation

  • [X] I have read the FAQ.
  • [X] I have tested the latest development build of Holographic Displays and the bug is still present.
  • [X] I have updated Spigot to the latest release for my particular Minecraft version.
  • [X] I made sure the bug hasn't already been reported on the issue tracker.

Description

How can I prevent from using so much CPU? image

How to reproduce

  1. 50 holograms without rainbow effect

Server version

1.18.2 purpur

Holographic Displays version

The laster build 205

Installed plugins that allow players to join with multiple Minecraft versions

ViaVersion, ViaBackwards

Additional information

No response

UnitedCraft avatar Mar 19 '22 10:03 UnitedCraft

Can confirm the same issue: image

How to reproduce 46 holograms without rainbow effect

Server version 1.18.1 paper

Holographic Displays version 3.0.0 Beta 2

Installed plugins that allow players to join with multiple Minecraft versions ViaVersion

This has led to huge tps drops from 20 -> 10, with no players online at all.

jurienhamaker avatar Mar 24 '22 22:03 jurienhamaker

Having the same issues, not even that many holograms and using zero placeholders outside of &u

HexedHero avatar Apr 06 '22 22:04 HexedHero

Does this still happen with the latest versions? I tried spawning many holograms locally, but it doesn't seem to impact performance like that. I have no clue what causes it in particular, and I don't think I can optimize the code further.

filoghost avatar Jan 27 '24 15:01 filoghost

Still quite a large amount of cpu usage on 1.18.2 (v3.0.4) image

w4sb0y avatar Feb 03 '24 20:02 w4sb0y

I don't see anything too weird here, since sending packets is how the plugin works. Possibly there are some placeholders which are updating frequently, causing many packets to be sent? Maybe the packets should be sent from a different thread, as a solution? Not sure if it's even allowed. But given that I will stop maintaining the plugin the end of this month, I don't think it's worth the effort.

filoghost avatar Feb 17 '24 17:02 filoghost

Just checked, it seems that sending packets async is possible, but I'm not sure of the implications or if it does cause race conditions or concurrency issues (which are extremely hard to find and debug). Might try one last patch before stopping the maintenance.

filoghost avatar Feb 17 '24 18:02 filoghost

I've made a quick (and ugly) change for async packets with the latest dev build.

Be aware that this is a highly experimental build, might have some unintended bugs. When you make the code run async, especially in Bukkit/Spigot, it might cause some race conditions, hard to reproduce and debug.

My personal tip is just to do yourself a favor and switch to another plugin, rather than use this build, which is a temporary fix since the plugin will not be maintained. If you want to try it: https://ci.codemc.io/job/filoghost/job/HolographicDisplays/

filoghost avatar Feb 19 '24 22:02 filoghost

thank you for your service o7

Xaziss avatar Feb 21 '24 06:02 Xaziss