Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Add option to change update rate for NPCs

Open alexey-va opened this issue 3 years ago • 2 comments

I confirm that I have ...

  • [X] ...tried the latest Development Build to make sure my feature doesn't exist already.
  • [X] ...checked the Wiki for any possible information about my feature.
  • [X] ...checked other existing issues for my feature request.

Description

Currently Citizens updates some stuff every tick (e.g. npc name). It can take a noticable part of server's tps while sometimes there is no need for that. I have 40 npcs with static names and due to updates taking place every tick Citizens is by far the most heavy plugin on my server.

Code Example

No response

alexey-va avatar Sep 14 '22 19:09 alexey-va

I have the same issue, static npcs without the need to be updated take a lot of server performance. I wish there would be a response to this issue or #2872

emmanuelvlad avatar Oct 04 '22 17:10 emmanuelvlad

In case empirical evidence of a performance problem is needed:

spark

spark report is here.

These are from the 6 NPCs we have on our server, which use the hologram trait:

npcs

galacticwarrior9 avatar Oct 09 '22 20:10 galacticwarrior9

can confirm this performance issue

matipoirierg avatar Nov 15 '22 22:11 matipoirierg

Dear devs, pls help. This will increase performance for many servers

alexey-va avatar Nov 28 '22 12:11 alexey-va

I have just pushed a micro optimisation for this issue.

fullwall avatar Nov 29 '22 22:11 fullwall

Going to close this for now, if required in a different context open another issue.

fullwall avatar Dec 03 '22 17:12 fullwall