froobynooby / ViewDistanceTweaks

Paper plugin that allows for dynamic simulation and view distances.
https://ci.froobworld.com/job/ViewDistanceTweaks/
MIT License
89 stars 17 forks source link

Feature: Allow limiting no-tick-view-distance to the highest player view distance #32

Open drakon64 opened 2 years ago

drakon64 commented 2 years ago

Add an option to limit the no-tick-view-distance to the highest client-side view distance of all connected players.

If, for example, the server maximum view distance is 32, but the highest view distance set by a connected player is 16, half of that view distance is being loaded by the server but not visible to the client, so it is effectively wasted. It takes time to load these unnecessary chunks from the disk and they also take up heap memory despite not doing anything.

I believe Paper simply doesn't send these chunks to connected clients if they won't be visible, but they're still loaded. This could also be beneficial to server forks that always send the server view distance to the client even if the client won't render it.