Store regions in SQLITE and other options + Region auto purge for inactive owners
LadyCailinBot opened this issue ยท 2 comments
WORLDGUARD-3029 - Reported by bernardopmbr
First of all, sorry for bad english =D
Hello everyone! I have 2 ideas that I think it would help a lot of people.
1 - As you may know, many plugins uses worldguard to create regions for players through commands. In big servers, this could be a disaster, since worldguard uses flat file, and in a 10mb regions.yml, it takes a lot of ticks to recognize the region, freezing the server. My suggestion is to create another region store method, such as SQLITE or even a stable MYSQL.
2 - Other idea that could help to reduce lag in big servers that use WorldGuard to protect playerss houses, is to create an option to auto-purge regions which the owner haven
t logged in a period of 30, 60days(you can choose in config.yml). When you create a region, it would have an flag called Auto-Purge. And when you put (True) ,It would activate the auto-purge system.
The reason I created this issue is because I`m suffering a lot of lag at my (300+ players) server, since there are more than 30000 regions in my build world. Every time someone buys a house, it freezes my server for 2, or even 3 seconds. Just imagine how awful it would be if four, or five people buy a house in less than 2 seconds.
Thanks for the support and for the attention guys!
(and once again, sorry for my low-level english, I`m from brazil =D )
Comment by sk89q
The main issue is that the load/save needs to occur in another thread.
Comment by sk89q
Well I implemented support for SQLite and it was even slower than YAML, and honestly it's extra work at the moment. The current dev builds have partial save for background region loads and saves, and the next set of commits I will post should improve support for background loads and saves.
As for the second request, please make a separate issue.