Skip to content

Conversation

@bruceg
Copy link
Member

@bruceg bruceg commented Jan 20, 2026

Summary

  1. Avoid cloning the string generated by the group_by template when we can pass in ownership.
  2. Defer generating the string value of the key_field until it is needed, which can be expensive if the underlying value is not a UTF-8 string.

Vector configuration

How did you test this PR?

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

1. Avoid cloning the string generated by the `group_by` template when we can
pass in ownership.
2. Defer generating the string value of the `key_field` until it is needed,
which can be expensive if the underlying value is not a UTF-8 string.
@bruceg bruceg added the transform: sample Anything `sample` transform related label Jan 20, 2026
@bruceg bruceg requested a review from a team as a code owner January 20, 2026 23:24
@bruceg bruceg added type: tech debt A code change that does not add user value. domain: performance Anything related to Vector's performance no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Jan 20, 2026
@github-actions github-actions bot added the domain: transforms Anything related to Vector's transform components label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: performance Anything related to Vector's performance domain: transforms Anything related to Vector's transform components no-changelog Changes in this PR do not need user-facing explanations in the release changelog transform: sample Anything `sample` transform related type: tech debt A code change that does not add user value.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants