Skip to content

Conversation

@cameronbowe
Copy link

Hi there, hope all is well.

On our network, we noticed over 150,000 files within this plugin folder purely having the same default values. With this, I've created a patch that is aimed at eliminating this amount of data (especially at large scales).

Preventing this is quite simple. When serializing the properties, compare each value to the default- if it's the same, there is no reason to store it. After doing so, check the JSON array of serialized properties, and if it's empty, there is no reason to store the player's data entirely. This HEAVILY reduces the amount of data stored.

I'd love for you to look this over, and I appreciate your time.

…ly at a large scale.

When we save data, the following checks are now made.
 - A count is stored of how many properties are saved which are not default value.
 - It will not save a property if it's default value.
 - If all properties are default value, it will not save the player entirely.
@LOOHP
Copy link
Owner

LOOHP commented Dec 23, 2025

Thank you for the PR! I was holding off on merging this because I was added DB support around the same time as your PR. Now that that is merged I can revisit your PR. I will take a look at this after the 1.21.11 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants