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

Reduce memory usage during plotting/replotting by deferring memory allocation #2051

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

nazar-pc
Copy link
Member

@nazar-pc nazar-pc commented Oct 4, 2023

During plotting there are several things that consume memory: downloaded pieces, deriving of Chiapos tables, final sector construction.

While some of these have to overlap, there is technically no reason for all of them to overlap. In this PR we delay allocation of sector and its metadata to when we actually write there, such that we don't overlap it with piece downloading, reducing peak memory usage as the result. This is especially important because Chiapos derivation uses much more RAM than before due to k20 instead of k17.

Code contributor checklist:

@nazar-pc nazar-pc force-pushed the reduce-memory-usage-during-plotting branch from 1224ff5 to 019f869 Compare October 4, 2023 12:06
@nazar-pc nazar-pc added this pull request to the merge queue Oct 4, 2023
Merged via the queue into main with commit 2cd8d55 Oct 4, 2023
10 checks passed
@nazar-pc nazar-pc deleted the reduce-memory-usage-during-plotting branch October 4, 2023 13:39
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