multiconnect

multiconnect

108k Downloads

Optimize chunk translation

Earthcomputer opened this issue ยท 2 comments

commented

Currently, the further back you go, especially 1.12 and further back, chunk loading becomes unacceptably slow. There are two possible ways to optimize this:

  • Direct translation of chunks. Chunks will be directly translated from the server version to the client version without the normal cascading translation packets normally undergo. This will introduce a maintenance cost, as every time Mojang changes the chunk format in the future, we would now need to update and test every translator from every older version (which has different chunks).
  • Modify the client backend to understand the chunk format of the server. This means not translating the chunk at all and instead redirecting every call to get a block from the chunk to a different data structure specific to that server version. This would produce the fastest results (only slightly slower or the same as a vanilla client on the server's version), but may introduce mod incompatibilities, and become harder to maintain and implement as different chunk storage implementations diverge from the main codebase over a wider range of versions.

Another possible option is a hybrid approach, where the second approach is used where possible but some translation may be applied where this is troublesome, like for block connections in 1.12.2 <-> 1.13.

commented

This has been partially resolved by moving the majority of chunk translation off-thread. It would be nice if block connections could also be moved off-thread where possible.

commented

Delivered.