Skip to content

Explicitly reallocate bigchunk slice to avoid up to 2x overhead #1702

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

Merged
merged 1 commit into from
Sep 29, 2019

Conversation

bboreham
Copy link
Contributor

append() doubles the size every time it needs more space, which is quite noticeable after #1649.

These slices are only extended every 120 samples, which is 30 minutes at 15-second sampling, and we're already copying the chunk buffer itself for similar reasons.

Signed-off-by: Bryan Boreham <bryan@weave.works>
@bboreham bboreham changed the title Explicitly reallocate slice to avoid up to 2x overhead Sep 27, 2019
@bboreham bboreham merged commit d601f0a into master Sep 29, 2019
@bboreham bboreham deleted the bigchunk-smaller-slice branch September 29, 2019 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants