LuckPerms

LuckPerms

41.4k Downloads

Memory issue

SlimeDog opened this issue ยท 1 comments

commented

Per analysis of a heap dump by a member of the Citizens team (we are tracking down memory leaks in Citizens):

me.lucko.luckperms.bukkit.model.server.LPSubscriptionMap is a special type retained by
LuckPerms as its official way of implementing a permissions system [...]

It essentially has a list of every permission string it knows about, and each perm value has a map
of player entities to a boolean value object (true/false whether they have the permission). All 5588
player entities and then also some more somehow (5614 entries. Possibly a few of non-player types.
Maybe perm groups or similar are stuck in there as well) are retained. Luckily that ends up only
being 60MB of space wasted [...] in this dump (though that number is likely
lower than reality, as it discounts all memory also retained by other memory leaks. A few hundred
MB are in use by the random outdated NPC entity objects that are being held as a leak).

They suggest that this issue should be examined and resolved. Passing it on...

commented

Apologies, I wrote the text in the quote above as a side note while diagnosing a separate issue, didn't look too far into it. I believe the issue mentioned there roots in the way Bukkit handles permissions, and isn't noticeably worsened in any way by LuckPerms injecting into it. I just blamed LuckPerms initially there as it was the type involved (which, after actually looking, is just a swap out type placed into Bukkit) and I for some reason made the silly assumption that Bukkit permissions aren't implemented terribly, and that the implementation I was looking indirectly at in a heapdump was a decision made by LuckPerms, which it actually isn't. So it's not a LuckPerms issue.