Chunky (Bukkit)

Chunky (Bukkit)

20.6k Downloads

Add option to limit the pregen speed

Strokkur424 opened this issue ยท 3 comments

commented

Feature request

Many people have requests a feature, which limits the generation speed of chunky in order to be able to let it run in the background whilst players are on the server, without it affecting their gameplay. I think this is a sensible feature to support considering the high demand for it.

Proposed changes

My idea would be the introduction of a new subcommand for /chunky:

/chunky maxspeed 30 -- limits the max generation speed to 30 CPS

Implementation details

From a technical standpoint, this could be accomplished by generating the first, in this example, 30 chunks, taking the time it took (a.e. 0.2s), and adding slight delays before dispatching generation tasks. I am not a chunky internals expert, so this might not be feasible without a rewrite to some degree, but I think many people would appreciate a limiter of this type.

EDIT: Preferably this would only limit the generation of new chunks, not limit the speed at which existing chunks are "touched".

commented

There are about a dozen or so duplicates to this but I'll think about it again due to how things have evolved over the years. Keep in mind for anyone following this there are already some system properties documented in the wiki which already allow controlling the speed to a degree, but usually the recommendation is to avoid any of that entirely and fix any issues causing performance degradation on the server (the root issue).

commented

What system properties could be used for that? I think it might be helpful in cases where, for example, you want to pre-generate a small part of a world for a minigame, so that when the player is moved into the world it loads faster. On the other hand, it might be unnecessary if Chunky already self-throttles or handles this automatically.

commented

What system properties could be used for that? I think it might be helpful in cases where, for example, you want to pre-generate a small part of a world for a minigame, so that when the player is moved into the world it loads faster. On the other hand, it might be unnecessary if Chunky already self-throttles or handles this automatically.

These are listed on the wiki.