-
Notifications
You must be signed in to change notification settings - Fork 858
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
Optimize SpanBuilderSdk link memory #753
Optimize SpanBuilderSdk link memory #753
Conversation
Codecov Report
@@ Coverage Diff @@
## master #753 +/- ##
============================================
- Coverage 78.84% 78.79% -0.06%
+ Complexity 761 759 -2
============================================
Files 98 98
Lines 2709 2711 +2
Branches 255 256 +1
============================================
Hits 2136 2136
- Misses 473 474 +1
- Partials 100 101 +1
Continue to review full report at Codecov.
|
This looks fine to me - and while on that subject, I've long wondered if we should keep the same behavior we have with Maybe @bogdandrutu remembers about this, since we are using OC based code? ;) |
Do you know why we would drop the "eldest" entry, rather than just dropping any that exceed the maximum? Is there a reason why recency would mean more relevance? |
…runcate on span creation.
098a2fd
to
cf86f36
Compare
@@ -127,10 +128,18 @@ | |||
@Override | |||
public Span.Builder addLink(Link link) { | |||
Utils.checkNotNull(link, "link"); | |||
totalNumberOfLinksAdded++; | |||
// don't bother doing anything with any links beyond the max. |
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.
It is better to drop the earliest in general.
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.
Can you explain why? Are later links somehow better than earlier ones? What's the business rationale here? [the code is much more efficient if we can just drop the later ones]
resolves #709