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

Avoid keeping entire ids in memory #267

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

milancurcic
Copy link
Member

Introduced in 0.20.1 when I generalized subset.

We compute ids(obs) on the fly but really only use them to apply the mask. Before this PR the code kept a copy of ids in memory while subset was in progress, and this is not necessary.

Amazingly, when subsetting one (1) trajectory by ID from gdp-v2.01, this one-line change reduces memory use from ~2.8 GB down to ~1.8GB.

@milancurcic milancurcic merged commit 194c516 into Cloud-Drift:main Sep 15, 2023
12 checks passed
@milancurcic milancurcic deleted the subset-better-memory-use branch September 15, 2023 20:30
philippemiron pushed a commit to philippemiron/clouddrift that referenced this pull request Nov 16, 2023
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.

1 participant