Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

[impl] Improve the performance of the AbstractSpanBuilder and Abstrac… #93

Closed
wants to merge 1 commit into from

Conversation

manolama
Copy link

…tSpan

by lazily initializing maps and lists to avoid eating heap space when it
won't be needed.
Also add tons of unit tests for the AbstractSpanBuilder and AbstractSpan.
Some validation should occur here if these are meant to be overridden by
implementations.

…tSpan

by lazily initializing maps and lists to avoid eating heap space when it
won't be needed.
Also add tons of unit tests for the AbstractSpanBuilder and AbstractSpan.
Some validation should occur here if these are meant to be overridden by
implementations.
@wu-sheng
Copy link
Member

Hi, I review your code, and see your point about lazily initializing maps and lists.

And here is a scenario, if a span object is hold by two thread, and setTag concurrently, your lazily initializing mechanism have a chance losing some tags, because of map/list init-override. Although, a span object hold by two thread is not recommended, but not forbidden.

@bhs
Copy link
Contributor

bhs commented Apr 30, 2017

This is going to be obviated by #115, btw. I'm going to close since this is a dormant PR. If that's a problem please let me know and we'll figure something out.

@bhs bhs closed this Apr 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants