Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@solonovamax

Description

@solonovamax

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions