randombyte-developer / unity

A Sponge plugin.
https://ore.spongepowered.org/RandomByte/Unity
GNU General Public License v2.0
2 stars 4 forks source link

[Suggestion] Move all marriage info to DB/single files #4

Open Rasgnarok opened 6 years ago

Rasgnarok commented 6 years ago

On a largely populated server, it is pretty sure to become hard to manage if the unity.config file keeps growing as marriage count grows. Basically, divorcing, changing homes will cause immense lag once it needs to write/read with a large file.

I'd like to basically suggest either a basic DB or file storage that would prevent the buildup of information in a single location, avoiding large issues later on.

randombyte-developer commented 6 years ago

Ok, I plan to add a separate file which keeps track of all marriages. Both files will then be in a unity folder in the config folder. I try to add an automatic import mechanism of the old config(and mark it afterwards as 'old'). I won't add database support for now, first I will add some profiling to actually check how bad the lag is. As of now, the plugin always saves the config when changes were made. And it caches the config, so for read operations(e.g. listing all marriages) no actual file is read. It only reloads the config from the file when /sponge plugins reload is executed.

randombyte-developer commented 5 years ago

Do you have any data from servers which report exactly that? It would be cool if you had a valid unity.conf with many marriages.