Command Lag, may be Permissions Related
PintaPepo opened this issue ยท 1 comments
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:
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
The cause of the lag you're seeing is due to creating new Permission
instances for each permission call.
These should probably just be player.isPermissionSet
calls.