NametagEdit

721k Downloads

NameTagEdit 1.12 lagg

Sikatsu opened this issue ยท 16 comments

commented

NameTagEdit seems to be quite laggy on 1.12.

React output: http://prntscr.com/fhtrw2 / 70.8338ms

Seems quite high.

  1. Timings output 1.12: http://prntscr.com/fhuej1

  2. Timings output 1.12: http://prntscr.com/fhuum6

  3. Timings output 1.11.2: http://prntscr.com/fhuuvs

commented

Hello sorry for the late reply. Regarding this, and the other issue you opened, would you be free to do some testing tomorrow, Saturday June 9th? I am looking into this and the other issue you reported.

commented
commented

It seems our timezones are completely different. Midnight is coming close for me haha.
As for the other issue I made, I added some additional information.

commented

Yeah I am in the PST time zone, just after lunch at the moment. I have time to work on NTE -- recently reinstalled windows. Of course the two placeholder APIs we use both have unreachable repositories, so I can't download the dependencies to my local repository. In the meantime, I'll try to see if I can replicate the timings issues with the Jenkins build.

commented
0.00%	   1.83%	  0.00 s	     0.92 ms	 0.0	       0.0k	    Task: NametagHandler$3(Single)
0.00%	   0.84%	  0.00 s	     0.42 ms	 0.0	       0.0k	  NametagHandler::onPlayerJoin(PlayerJoinEvent)

My timings don't look too strange. Is it possible you have empty teams in your main scoreboard? That has been known to be problematic with plugins that create Scoreboard Teams like NametagEdit.

Edit 2: Disregard edit1
How many entries do you have in your file? (groups + players)

commented

I'm on my phone currently.
Players.yml is empty and my groups.yml is in the other issue. Around 18 entries are in. I used animatednames before, not sure whether that one made empty entries?

My timings look pretty bad continuesly, atleast with 20+ players online.

commented

Alright I will prepare a plugin for debugging if you are free to test tomorrow. I just conducted a test using 1.11 and my results seem to be within the same margin < 1 ms (normal spigot environment with NametagEdit - will test with PEX and ZPerms soon).

All file I/O and database operations are async -- so there go the usual suspects. There are a couple "unknowns" I will test:

  • Both placeholder APIs under the NametagHandler#formatWithPlaceholders method
  • NametagManager#setNametag as it instantiates the objects using reflection (though these fields are cached, so it SHOULDN'T be slow)
  • The empty nametag groups

Those are a few things that come to mind. Just let me know when you're free. In the meantime, I'll be playing around with 1.12 and see what changed.

commented

As the timings show, on 1.11 I didn't really have issues too. On 1.12 however, I have. The priority system is more of an issue then the lagg I guess.. altho not sure.

I'm free tomorrow, unfortunatly our time zones are different.

commented

I missed your message, didn't expect you yet haha!

There isn't an official 1.12 PEX unfortunatly. Let me know when I need to test something.

commented

Alright! Let's do some testing. I can PM you my Discord and we can talk there.

commented

Not sure how PM's work on GitHub, Sikatsu#5895

commented

Should now be resolved as of this commit: 1d55b6a

commented

New timings: http://prntscr.com/figz7b

It seems to indeed have impact on TPS spikes.

commented

Is it me or does it get worse by the day?

http://prntscr.com/fii1i7

   0.06%	1,162.95%	  1.16 s	   581.47 ms	 0.0	       0.0k	    HookPermissionsEX::onPermissionEntityEvent(PermissionEntityEvent)
   0.02%	  68.97%	  0.38 s	    34.49 ms	 0.0	       0.0k	    Task: NametagHandler$3(Single)
commented

PermissionEntityEvent from PEX seems to hang for nearly 600 ms! That's insane! Is there an official 1.12 PEX out there? The NametagEdit implementation is merely listening to the event and updating the Nametag (which takes 34.49 ms according to the timings).

We will test for empty teams today among a few other things. Because it has gotten worse with time, that likely means there is some build up/memory leak somewhere.