Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] Save list of generated chunks to disk to speed up generation of large area's #56

Open
Chemox opened this issue Jul 17, 2017 · 1 comment
Assignees

Comments

@Chemox
Copy link

Chemox commented Jul 17, 2017

First of all thank you for developing this mod.
It might be small but its an essential mod for every server owner.

Then the actual request:

When generating a world on a server I try to generate them in pieces so I can generate them inbetween server restarts and when no users are online. This however leads to some complications.
Unless you manually subdivide the wanted area into regions that you should generate the mod does not take into account that some of the chunks already exist. And checks them one by one if they exist or not.

This works fine for small generations as the amount of chunks to check is small.
But this gets problematic when you are generating a 20.000 x 20.000 area consisting of rougly 1562500 chunks. Checking every single one of these chunks means loading rougly 1525 regionfiles (32x32 chunks each) from disc to check if the chunk exists. It might even load the same region file multiple times depending on the order in which it generates these chunks.

Keeping a list of which chunks have been generated in each dimension by chunkgen and previously skipped because a player generated them would be a nice thing to have.
Checking against that list at generation start could drastically reduce the number of read operations from disk speeding up the process alot.

It might not seem much of an improvement if you look at small area's but for large area's in multiple generation sessions it might actually differ alot.

@gecgooden
Copy link
Owner

In regards to one of your first point about generating the chunks when no users are online, there is a config setting pauseForPlayers which will stop generation if any players are online.

Otherwise, seems like a good idea. I'll look into it.

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

No branches or pull requests

2 participants