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

Render: Diff optimization #31

Open
jacopograndi opened this issue May 4, 2024 · 0 comments
Open

Render: Diff optimization #31

jacopograndi opened this issue May 4, 2024 · 0 comments

Comments

@jacopograndi
Copy link
Owner

We currently send the whole chunk to the gpu every time it changes. The rust code does not know which version of the chunk is in the renderer, it only knows that the chunk at xyz has changed and its data.
We could add to Chunk a fixed lenght list diff that tracks which blocks have changed where and resets every time the renderer sends the chunk to the gpu.
This way we could send diff to the gpu if we know that the chunk is already there, and we keep track of which chunk is in the gpu using the allocator.
When diff is full we send the whole chunk. To find diff.len() we would need to to some benchmarking every time we change the chunk streaming code.
I believe this is a massive optimization that should be also used in net.

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