Skip to content

perf(logs): avoid string allocation when no parameters are passed#4697

Draft
Flash0ver wants to merge 2 commits intomainfrom
logs/perf-no-string-alloc-when-no-params
Draft

perf(logs): avoid string allocation when no parameters are passed#4697
Flash0ver wants to merge 2 commits intomainfrom
logs/perf-no-string-alloc-when-no-params

Conversation

@Flash0ver
Copy link
Member

Noticed during getsentry/sentry-unity#2389.

Avoid a string allocation when there are no parameters that the template string should be formatted with.

TODO:

  • after v6
  • a quick benchmark could not confirm the performance improvement ... need to follow up after v6 release

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Performance

- avoid string allocation when no parameters are passed ([#4697](https://github.com/getsentry/sentry-dotnet/pull/4697))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 786ce11

@github-actions
Copy link
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Dependencies ⬆️

Deps

  • chore(deps): update Java SDK to v8.32.0 by github-actions in #4843
  • chore(deps): add protobuf-javalite 3.25.8 dependency on Android by github-actions in #4843
  • chore(deps): Bumped Xamarin.AndroidX.Lifecycle.Common.Java8 and CommunityToolkit.Mvvm to 2.2.20 and 8.4.0 by jamescrosswell in #4876

Other

  • perf(logs): avoid string allocation when no parameters are passed by Flash0ver in #4697
  • ci: Skip device tests for non-mobile PRs by bruno-garcia in #4909

🤖 This preview updates automatically when you update the PR.

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.

1 participant