LuckPerms

LuckPerms

41.4k Downloads

Command Lag, may be Permissions Related

PintaPepo opened this issue ยท 1 comments

commented

I am trying to find the root cause for extreme lag spikes when executing the Residence subcommand to create a subzone.
After sampling 5 executions of subzone creation (each taking about 4 seconds in which the server main loop gets frozen), I get the following info from VisualVM:

image

Any other plugin command works as expected, permission calculation never lags.

Any idea what may be causing this extreme lag? Why permissions processing seems to take so long only for this command? I am trying to fix several flaws in the Residence plugin, and this is one of the biggest problem it has.

LuckPerms version: v5.0.130 with storage MariaDB, ping 0ms.
Local Data: 11 users, 15 groups, 0 tracks
Using git-Paper-172 (MC: 1.15.2)
Residence version: 4.9.0.5

commented

The cause of the lag you're seeing is due to creating new Permission instances for each permission call.

https://github.com/Zrips/Residence/blob/master/src/com/bekvon/bukkit/residence/permissions/PermissionManager.java#L575

These should probably just be player.isPermissionSet calls.