Skip to content

Conversation

@KonaeAkira
Copy link
Contributor

There is currently a lot of memory being wasted on storing the changed_blocks array even when there are no changed blocks. This PR makes changes to allocate the changed_blocks array on-demand.

Memory consumption when craftgpt is loaded (no players connected):

  • Master: ~11.4 GB
  • This PR: ~8.6 GB

@StackDoubleFlow
Copy link
Member

Did this significantly impact get_block performance at all? I wonder if it will create a redpiler compile time regression, for example.

@KonaeAkira
Copy link
Contributor Author

I currently don't have the time to test this, but my prediction is that this will have no measurable impact on the performance of get_block.

If someone decides to test this, the test should cover the case where there are no changed blocks and the case where there are changed blocks.

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

Successfully merging this pull request may close these issues.

2 participants