Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

BlockQuerier.SelectMatchingProfiles: Fix condition that caused memory wastage #804

Merged

Conversation

simonswine
Copy link
Collaborator

@simonswine simonswine commented Jun 28, 2023

While investigating grafana/pyroscope#2038, I noticed we never had more than one slice element and as we allocate 100 elements, that added 100 times more memory pressure than necessary.

Screenshot from 2023-06-28 10-21-51

@simonswine simonswine changed the title Fix condition when to create a new slice BlockQuerier.SelectMatchingProfiles: Fix condition that caused memory wastage Jun 28, 2023
@simonswine simonswine marked this pull request as ready for review June 28, 2023 09:33
Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@simonswine simonswine merged commit f331ff6 into grafana:main Jun 28, 2023
17 checks passed
simonswine added a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants