Skip to content

Conversation

filintod
Copy link
Contributor

@filintod filintod commented Aug 22, 2025

Description

After checking some profiling in one of our programs that makes use of this method, we noticed that a lot of the allocations and cpu time was sunk on this method

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation
    • Created the dapr/docs PR:

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

Signed-off-by: Filinto Duran <[email protected]>
Signed-off-by: Filinto Duran <[email protected]>
Signed-off-by: Filinto Duran <[email protected]>
Signed-off-by: Filinto Duran <[email protected]>
@filintod filintod marked this pull request as ready for review August 24, 2025 18:54
@filintod filintod requested review from a team as code owners August 24, 2025 18:54
… not added just comparison)

Signed-off-by: Filinto Duran <[email protected]>
Signed-off-by: Filinto Duran <[email protected]>
Signed-off-by: Filinto Duran <[email protected]>
Signed-off-by: Filinto Duran <[email protected]>

// ~8x speed - ~1/2 allocations

// unsafe comparison
Copy link
Contributor Author

@filintod filintod Aug 26, 2025

Choose a reason for hiding this comment

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

this is just for comparison with a run changing toString method to use unsafe []byte->string. In many cases it would be fine but leaving for future if really needed it could be added as an option

@filintod
Copy link
Contributor Author

@yaron2 should I put this in the 1.16 branch? or leave for later

@yaron2
Copy link
Member

yaron2 commented Aug 27, 2025

Linter needs go mod tidy

@filintod
Copy link
Contributor Author

@yaron2 I think that was coming from the main branch after I updated it here, but it seems fine after you updated it again

@yaron2 yaron2 merged commit aa622c3 into dapr:main Aug 28, 2025
90 checks passed
filintod added a commit to filintod/components-contrib that referenced this pull request Aug 29, 2025
Signed-off-by: Filinto Duran <[email protected]>
Co-authored-by: Yaron Schneider <[email protected]>
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.

3 participants