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

use ByteString.toArrayUnsafe() #1369

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

pjfanning
Copy link
Contributor

@pjfanning pjfanning commented Oct 2, 2024

If we know that the code that we pass the byte array to doesn't modify the array then this call is ok - and more efficient as we avoid cloning the array for safety purposes. This code path is a hot path. Every Akka/Pekko remote that has Kamon Context Propagation is affected by the existing array cloning.

Akka 2.5 does not support the ByteString.toArrayUnsafe() method.

akka 2.5 does not support toArrayUnsafe()
@hughsimpson hughsimpson merged commit c2338f6 into kamon-io:master Oct 10, 2024
2 checks passed
@pjfanning pjfanning deleted the array-unsafe branch October 10, 2024 16:59
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