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

fix: reduce memory usage during MergeFiles #1041

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

adamdecaf
Copy link
Member

We've been seeing getTraceNumbers use a ton of memory, which isn't surprising since it allocates (and then expands) an array of trace numbers. This can be bypassed with a mess of for loops instead.

Running achgateway's tests before:
Screen Shot 2022-07-07 at 10 57 02 AM
Screen Shot 2022-07-07 at 10 57 12 AM

After:
Screen Shot 2022-07-07 at 10 57 26 AM
Screen Shot 2022-07-07 at 11 02 16 AM

We've been seeing getTraceNumbers use a ton of memory, which isn't
surprising since it allocates (and then expands) an array of trace
numbers. This can be bypassed with a mess of for loops instead.
@adamdecaf adamdecaf requested a review from vxio as a code owner July 7, 2022 16:02
Copy link
Member

@vxio vxio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice optimization

@adamdecaf adamdecaf merged commit 474189e into moov-io:master Jul 7, 2022
@adamdecaf adamdecaf deleted the optimize-merge-entries branch July 7, 2022 16:34
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.

None yet

2 participants