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

[Feature Request] Use binary search algorithm for determining the appropriate view distance. #21

Open
solonovamax opened this issue Jan 9, 2022 · 0 comments

Comments

@solonovamax
Copy link

Currently, determining the appropriate view distance is done by incrementing/decrementing the current view distance by 1.
Using a search algorithm similar to a binary search would be very helpful, as it would have a time complexity of O(log n) instead of the current O(n), which can be quite noticeable when starting up a server.

With a minimum view distance of 4 and a maximum of 24, it took around 7 minutes to reach the full render distance of 24, when the MSPT was at 3.85 when the render distance was set to 5, and when increased to 24, the mspt was only 4.05.
Had it done a binary search, it could have much more efficiently determined the point at which the mspt approaches 50 (the limit I have set), and then from there gone up incrementally, as the tps can fluctuate a bit naturally (so a perfect binary search wouldn't work)

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

No branches or pull requests

1 participant