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

Memory usage increases continuously during gameplay #24

Open
ghost opened this issue Nov 4, 2024 · 1 comment
Open

Memory usage increases continuously during gameplay #24

ghost opened this issue Nov 4, 2024 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 4, 2024

While the program is running, the memory usage keeps rising until all memory is exhausted.

A few minutes after the program started:
first

Some time later:
real

I'd say this is a pretty significant issue.

@GelbEinhalb
Copy link

Are you sure this is a general issue and not just happening when loading chunks until the render distance is being reached?

In my experience, memory usage does spike initially while chunks are loading but then stabilizes once the target render distance is reached.

My observation

  1. At startup, memory usage is around 115M:
    btop-screenshot-1

  2. When the render distance is set to 10, memory usage stabilizes at around 497M after initial loading:
    btop-screenshot-2

  3. Increasing the render distance to 25 and render height to 10 results in a peak of around 2.6G, which then remains steady:
    btop-screenshot-3

It took some time for all those chunks to render, but as soon as the chunks variable stopped rising, I checked btop and took the screenshots. It seems that memory usage scales predictably with render distance and height settings but doesn't continually increase once the chunks are fully loaded. The spike is probably more a function of the initial loading process rather than a persistent memory leak.

How can you check?

To verify if this behavior matches what you are seeing, you could monitor the number of chunks loaded. This should provide a better insight into whether memory usage is tied to chunk-loading or if it continues to increase abnormally over time.

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