-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
baggage: Improve performance #4743
baggage: Improve performance #4743
Conversation
goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/baggage cpu: AMD EPYC 7B13 │ /tmp/old.txt │ /tmp/new.txt │ │ sec/op │ sec/op vs base │ NewMember-96 368.20n ± 21% 46.94n ± 3% -87.25% (p=0.000 n=10)
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4743 +/- ##
=====================================
Coverage 82.0% 82.1%
=====================================
Files 225 225
Lines 18242 18325 +83
=====================================
+ Hits 14976 15059 +83
Misses 2981 2981
Partials 285 285
|
Please fix the build (lint) failures. |
Can you please run all benchmarks for the whole package? The changes should also affect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you the contribution.
I agree with @pellared's comments in that this looks like a partial solution. There is coupling with other functionality that this does not address. I do not think these changes should be accepted as they currently are presented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did my best in reviewing the PR. I made some IMO trivial (editorial) changes directly. I also have a bigger suggestion on how parsePropertyInternal
could be implemented to make it more readable and maintainable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving.
However, I would appreciate adding some more comments to the code as suggested in #4743 (comment) and #4743 (comment).
Thank you for your contribution 👍
hi everyone, just checking in, is there anything else missing to merge this? Also, I couldn't find it, what is the process for releasing? Do you release on a schedule or is it on-demand? |
Several of our microservices during profiling report a considerable cost coming from the regex that validate the key and the value (in the range of 3-6%). For instance:
After checking the regex I saw that we can easily replace that to a simple for loop implementation. All tests are passing, but hopefully didn't miss a condition.