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

Improve peak memory by pushing sorting of large tables upstream of functions #148

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

akoumjian
Copy link
Collaborator

Large tables being sorted inside functions doubles the peak memory required, even if the parent caller is replacing the original table with some version of the sorted one. This is because the python garbage collector is not smart enough to know that the higher level reference is going to be replaced and a table sort duplicates the data (the same goes for defragmentation).

The next area to look at here is the test orbit ephemeris generation, as there are lots of id sorting and comparisons done. I think with some smart adjustments we may be able to reduce the peak memory there as well.

@akoumjian akoumjian merged commit 05cf583 into main Jan 18, 2024
4 of 5 checks passed
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