Skip to content

Query-Frontend: Perf improvements#4242

Merged
joe-elliott merged 12 commits intografana:mainfrom
joe-elliott:drop-headers
Nov 1, 2024
Merged

Query-Frontend: Perf improvements#4242
joe-elliott merged 12 commits intografana:mainfrom
joe-elliott:drop-headers

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
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!

Comment thread modules/frontend/frontend.go Outdated
Comment thread modules/frontend/metrics_query_range_sharder.go Outdated
Comment thread modules/frontend/metrics_query_range_sharder.go Outdated
Comment thread modules/frontend/search_sharder.go
Comment thread modules/frontend/tag_sharder.go
Comment thread modules/frontend/tag_sharder.go
Comment thread modules/frontend/traceid_sharder.go Outdated
Comment thread modules/frontend/traceid_sharder.go
Copy link
Copy Markdown
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 <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
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