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

Query-Frontend: Perf improvements #4242

Merged
merged 12 commits into from
Nov 1, 2024
Merged

Conversation

joe-elliott
Copy link
Member

@joe-elliott joe-elliott commented Oct 28, 2024

What this PR does:

Some small perf improvements and cleanup noticed while working on the ordered results PR.

  • Use our ReadAllWithEstimate() instead of io.ReadAll().
  • Standardized the way we clone child requests and dropped unnecessary headers.
  • Standardized our response logging. We were using both "results" and "response" so i picked one.
  • Pre-alloc 100 bytes on the query builder slice

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@javiermolinar javiermolinar left a comment

Choose a reason for hiding this comment

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

Looking good!

modules/frontend/frontend.go Outdated Show resolved Hide resolved
modules/frontend/metrics_query_range_sharder.go Outdated Show resolved Hide resolved
modules/frontend/metrics_query_range_sharder.go Outdated Show resolved Hide resolved
modules/frontend/search_sharder.go Show resolved Hide resolved
modules/frontend/tag_sharder.go Show resolved Hide resolved
modules/frontend/tag_sharder.go Show resolved Hide resolved
modules/frontend/traceid_sharder.go Outdated Show resolved Hide resolved
Copy link
Contributor

@javiermolinar javiermolinar left a comment

Choose a reason for hiding this comment

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

Great!

Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
@joe-elliott joe-elliott merged commit 44c18cc into grafana:main Nov 1, 2024
16 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